Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace TYPO3\ConsultantProfile\Domain\Model;
- /***************************************************************
- * Copyright notice
- *
- * (c) 2014
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
- /**
- *
- *
- * @package consultant_profile
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
- *
- */
- class Consultant extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
- /**
- * description
- *
- * @var \string
- * @validate NotEmpty
- */
- protected $description;
- /**
- * picture
- *
- * @var \string
- */
- protected $picture;
- /**
- * user
- *
- * @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
- * @var00 \int
- */
- protected $user;
- /**
- * reference1
- *
- * @var \string
- */
- protected $reference1;
- /**
- * reference2
- *
- * @var \string
- */
- protected $reference2;
- /**
- * reference3
- *
- * @var \string
- */
- protected $reference3;
- /**
- * reference4
- *
- * @var \string
- */
- protected $reference4;
- /**
- * reference5
- *
- * @var \string
- */
- protected $reference5;
- /**
- * categories
- *
- * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory>
- */
- protected $categories;
- /**
- * __construct
- *
- * @return Consultant
- */
- 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->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
- }
- /**
- * Returns the description
- *
- * @return \string $description
- */
- public function getDescription() {
- return $this->description;
- }
- /**
- * Sets the description
- *
- * @param \string $description
- * @return void
- */
- public function setDescription($description) {
- $this->description = $description;
- }
- /**
- * Returns the picture
- *
- * @return \string $picture
- */
- public function getPicture() {
- return $this->picture;
- }
- /**
- * Sets the picture
- *
- * @param \string $picture
- * @return void
- */
- public function setPicture($picture) {
- if (is_array($picture)) {
- $picture = $picture['name'];
- }
- $this->picture = $picture;
- }
- /**
- * Returns the user
- *
- * @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user
- */
- public function getUser() {
- return $this->user;
- }
- /**
- * Sets the user
- *
- * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user
- * @return void
- */
- public function setUser(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user) {
- $this->user = $user;
- }
- /**
- * Returns the reference1
- *
- * @return \string $reference1
- */
- public function getReference1() {
- return $this->reference1;
- }
- /**
- * Sets the reference1
- *
- * @param \string $reference1
- * @return void
- */
- public function setReference1($reference1) {
- $this->reference1 = $reference1;
- }
- /**
- * Returns the reference2
- *
- * @return \string $reference2
- */
- public function getReference2() {
- return $this->reference2;
- }
- /**
- * Sets the reference2
- *
- * @param \string $reference2
- * @return void
- */
- public function setReference2($reference2) {
- $this->reference2 = $reference2;
- }
- /**
- * Returns the reference3
- *
- * @return \string $reference3
- */
- public function getReference3() {
- return $this->reference3;
- }
- /**
- * Sets the reference3
- *
- * @param \string $reference3
- * @return void
- */
- public function setReference3($reference3) {
- $this->reference3 = $reference3;
- }
- /**
- * Returns the reference4
- *
- * @return \string $reference4
- */
- public function getReference4() {
- return $this->reference4;
- }
- /**
- * Sets the reference4
- *
- * @param \string $reference4
- * @return void
- */
- public function setReference4($reference4) {
- $this->reference4 = $reference4;
- }
- /**
- * Returns the reference5
- *
- * @return \string $reference5
- */
- public function getReference5() {
- return $this->reference5;
- }
- /**
- * Sets the reference5
- *
- * @param \string $reference5
- * @return void
- */
- public function setReference5($reference5) {
- $this->reference5 = $reference5;
- }
- /**
- * Adds a ConsultantCategory
- *
- * @param \TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $category
- * @return void
- */
- public function addCategory(\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $category) {
- $this->categories->attach($category);
- }
- /**
- * Removes a ConsultantCategory
- *
- * @param \TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $categoryToRemove The ConsultantCategory to be removed
- * @return void
- */
- public function removeCategory(\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $categoryToRemove) {
- $this->categories->detach($categoryToRemove);
- }
- /**
- * Returns the categories
- *
- * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory> $categories
- */
- public function getCategories() {
- return $this->categories;
- }
- /**
- * Sets the categories
- *
- * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory> $categories
- * @return void
- */
- public function setCategories(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories) {
- $this->categories = $categories;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment