FluidTYPO3\Flux\ViewHelpers\Field\AbstractMultiValueFieldViewHelper::getPreparedComponent PHP Method

getPreparedComponent() protected static method

protected static getPreparedComponent ( string $type, TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext, array $arguments ) : FluidTYPO3\Flux\Form\MultiValueFieldInterface
$type string
$renderingContext TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface
$arguments array
return FluidTYPO3\Flux\Form\MultiValueFieldInterface
    protected static function getPreparedComponent($type, RenderingContextInterface $renderingContext, array $arguments)
    {
        /** @var MultiValueFieldInterface $component */
        $component = parent::getPreparedComponent($type, $renderingContext, $arguments);
        $component->setMinItems($arguments['minItems']);
        $component->setMaxItems($arguments['maxItems']);
        $component->setSize($arguments['size']);
        $component->setMultiple($arguments['multiple']);
        $component->setRenderMode($arguments['renderMode']);
        $component->setItemListStyle($arguments['itemListStyle']);
        $component->setSelectedListStyle($arguments['selectedListStyle']);
        return $component;
    }

Usage Example

 /**
  * @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;
 }
All Usage Examples Of FluidTYPO3\Flux\ViewHelpers\Field\AbstractMultiValueFieldViewHelper::getPreparedComponent
AbstractMultiValueFieldViewHelper