Created
January 12, 2016 12:15
-
-
Save koernchen02/f51318b44aad3ecde5f2 to your computer and use it in GitHub Desktop.
ObjectStorage annotation for Exception/CMS/1234386924 Cannot create empty instance of the class "TYPO3\CMS\Extbase\Persistence\ObjectStorage" because it does not implement the TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| /** | |
| * fellows | |
| * | |
| * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage | |
| * @lazy | |
| */ | |
| protected $fellows; | |
| ... | |
| /** | |
| * __construct | |
| * | |
| * @return void | |
| */ | |
| public function __construct() { | |
| //Do not remove the next line: It would break the functionality | |
| $this->initStorageObjects(); | |
| } | |
| /** | |
| * Initializes all Tx_Extbase_Persistence_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->fellows = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); | |
| } | |
| ... | |
| /** | |
| * Returns fellows | |
| * | |
| * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $fellows | |
| */ | |
| public function getFellows() { | |
| return $this->fellows; | |
| } | |
| /** | |
| * Sets fellows | |
| * | |
| * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $fellows | |
| * @return void | |
| */ | |
| public function setFellows(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $fellows) { | |
| $this->fellows = $fellows; | |
| } | |
| /** | |
| * Adds a fellow | |
| * | |
| * @param Fellow fellow | |
| * @return void | |
| */ | |
| public function addFellow(Fellow $fellow) { | |
| $this->fellows->attach($fellow); | |
| } | |
| /** | |
| * Removes a Fellow | |
| * | |
| * @param Fellow $fellow | |
| * @return void | |
| */ | |
| public function removeFellow(Fellow $fellow) { | |
| $this->fellows->detach($fellow); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'fellows' => array( | |
| 'exclude' => 0, | |
| 'l10n_mode' => 'exclude', | |
| 'label' => 'LLL:EXT:app/Resources/Private/Language/locallang_db.xlf:tx_app_domain_model_multimedia.fellows', | |
| 'config' => array( | |
| 'type' => 'select', | |
| 'foreign_table' => 'tx_app_domain_model_fellow', | |
| 'MM' => 'tx_app_multimedia_fellow_mm', | |
| 'MM_opposite_field' => 'multimedia', | |
| 'size' => 5, | |
| 'autoSizeMax' => 30, | |
| 'maxitems' => 10, | |
| 'multiple' => 0, | |
| 'wizards' => array( | |
| '_PADDING' => 1, | |
| '_VERTICAL' => 1, | |
| 'suggest' => array( | |
| 'label' => 'Select from more than 1000', | |
| 'type' => 'suggest', | |
| ) | |
| ), | |
| ), | |
| ), | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment