/** * @param string $type * @param RenderingContextInterface $renderingContext * @param array $arguments * @return RelationFieldInterface */ protected static function getPreparedComponent($type, RenderingContextInterface $renderingContext, array $arguments) { /** @var RelationFieldInterface $component */ $component = parent::getPreparedComponent($type, $renderingContext, $arguments); $component->setTable($arguments['table']); $component->setCondition($arguments['condition']); $component->setManyToMany($arguments['mm']); $component->setForeignField($arguments['foreignField']); $component->setForeignSelector($arguments['foreignSelector']); $component->setForeignLabel($arguments['foreignLabel']); $component->setForeignSortby($arguments['foreignSortby']); $component->setForeignDefaultSortby($arguments['foreignDefaultSortby']); $component->setForeignTableField($arguments['foreignTableField']); $component->setForeignUnique($arguments['foreignUnique']); $component->setSymmetricField($arguments['symmetricField']); $component->setSymmetricLabel($arguments['symmetricLabel']); $component->setSymmetricSortby($arguments['symmetricSortby']); $component->setLocalizationMode($arguments['localizationMode']); $component->setLocalizeChildrenAtParentLocalization($arguments['localizeChildrenAtParentLocalization']); $component->setDisableMovingChildrenWithParent($arguments['disableMovingChildrenWithParent']); $component->setShowThumbnails($arguments['showThumbs']); $component->setMatchFields((array) $arguments['matchFields']); $component->setOppositeField($arguments['oppositeField']); $component->setEmptyOption($arguments['emptyOption']); return $component; }
/** * Initialize * @return void */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('items', 'mixed', 'Items for the selector; array / CSV / Traversable / Query supported', TRUE); $this->registerArgument('emptyOption', 'mixed', 'If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property\'s value (cast to string) as label.', FALSE, FALSE); $this->registerArgument('translateCsvItems', 'boolean', 'If TRUE, attempts to resolve a LLL label for each value provided as CSV in "items" attribute using convention for lookup "$field.option.123" if given "123" as CSV item value. Field name is determined by normal Flux field name conventions'); }
/** * Initialize * @return void */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('maxSize', 'integer', 'Maximum file size allowed in KB'); $this->registerArgument('allowed', 'string', 'Defines a list of file types allowed in this field'); $this->registerArgument('disallowed', 'string', 'Defines a list of file types NOT allowed in this field'); $this->registerArgument('uploadFolder', 'string', 'Upload folder. DEPRECATED, will be moved to the File field ViewHelper'); $this->registerArgument('showThumbnails', 'boolean', 'If TRUE, displays thumbnails for selected values', FALSE, FALSE); }
/** * @param string $type * @return RelationFieldInterface */ protected function getPreparedComponent($type) { /** @var RelationFieldInterface $component */ $component = parent::getPreparedComponent($type); $component->setTable($this->arguments['table']); $component->setCondition($this->arguments['condition']); $component->setManyToMany($this->arguments['mm']); $component->setForeignField($this->arguments['foreignField']); $component->setForeignSelector($this->arguments['foreignSelector']); $component->setForeignLabel($this->arguments['foreignLabel']); $component->setForeignSortby($this->arguments['foreignSortby']); $component->setForeignDefaultSortby($this->arguments['foreignDefaultSortby']); $component->setForeignTableField($this->arguments['foreignTableField']); $component->setForeignUnique($this->arguments['foreignUnique']); $component->setSymmetricField($this->arguments['symmetricField']); $component->setSymmetricLabel($this->arguments['symmetricLabel']); $component->setSymmetricSortby($this->arguments['symmetricSortby']); $component->setLocalizationMode($this->arguments['localizationMode']); $component->setLocalizeChildrenAtParentLocalization($this->arguments['localizeChildrenAtParentLocalization']); $component->setDisableMovingChildrenWithParent($this->arguments['disableMovingChildrenWithParent']); $component->setShowThumbnails($this->arguments['showThumbs']); return $component; }
/** * Initialize * @return void */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('items', 'mixed', 'Items for the selector; array / CSV / Traversable / Query supported', TRUE); $this->registerArgument('emptyOption', 'mixed', 'If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property\'s value (cast to string) as label.', FALSE, FALSE); }
/** * Initialize * @return void */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('items', 'mixed', 'Items for the selector; array / CSV / Traversable / Query supported', TRUE); }