Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace TEST\MyMegamenu\Domain\Model;
- /**
- *
- *
- * @package My_megamenu
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
- *
- */
- class Page extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
- /**
- * uid
- * @var int
- * @validate NotEmpty
- */
- protected $uid;
- /**
- * pid
- * @var int
- * @validate NotEmpty
- */
- protected $pid;
- /**
- * sorting
- * @var int
- * @validate NotEmpty
- */
- protected $sorting;
- /**
- * title
- * @var string
- *
- */
- protected $title;
- /**
- * subtitle
- * @var string
- *
- */
- protected $subtitle;
- /**
- * subpages
- *
- * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TEST\MyMegamenu\Domain\Model\Page>
- */
- protected $subpages;
- /**
- * __construct
- *
- * @return Page
- */
- public function __construct() {
- //Do not remove the next line: It would break the functionality
- $this->initStorageObjects();
- }
- /**
- * Initializes all ObjectStorage properties.
- *
- * @return void
- */
- protected function initStorageObjects() {
- /**
- * Do not modify this method!
- * It will be rewritten on each save in the extension builder
- * You may modify the constructor of this class instead
- */
- $this->subpages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
- }
- /**
- * Returns the pid
- *
- * @return int $pid
- */
- public function getPid() {
- return $this->pid;
- }
- /**
- * Returns the sorting
- *
- * @return int $sorting
- */
- public function getSorting() {
- return $this->sorting;
- }
- /**
- * Returns the title
- *
- * @return string $title
- */
- public function getTitle() {
- return $this->title;
- }
- /**
- * Returns the subtitle
- *
- * @return string $subtitle
- */
- public function getSubtitle() {
- return $this->subtitle;
- }
- /**
- * menuimage
- *
- * @var \string
- */
- protected $menuimage;
- /**
- * Returns the menuimage
- *
- * @return \string $menuimage
- */
- public function getMenuimage() {
- return $this->menuimage;
- }
- /**
- * Sets the menuimage
- *
- * @param \string $menuimage
- * @return void
- */
- public function setMenuimage($menuimage) {
- $this->menuimage = $menuimage;
- }
- /**
- * Adds a Page
- *
- * @param \TEST\MyMegamenu\Domain\Model\Page $subpage
- * @return void
- */
- public function addSubpage(\TEST\MyMegamenu\Domain\Model\Page $subpage) {
- $this->subpages->attach($subpage);
- }
- /**
- * Removes a Page
- *
- * @param \TEST\MyMegamenu\Domain\Model\Page $subpageToRemove The Page to be removed
- * @return void
- */
- public function removeSubpage(\TEST\MyMegamenu\Domain\Model\Page $subpageToRemove) {
- $this->subpages->detach($subpageToRemove);
- }
- /**
- * Returns the subpages
- *
- * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TEST\MyMegamenu\Domain\Model\Page> $subpages
- */
- public function getSubpages() {
- return $this->subpages;
- }
- /**
- * Sets the subpages
- *
- * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TEST\MyMegamenu\Domain\Model\Page> $subpages
- * @return void
- */
- public function setSubpages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $subpages) {
- $this->subpages = $subpages;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment