FluidTYPO3\Flux\Form\AbstractFormField::build PHP Method

build() public method

Creates a TCEforms configuration array based on the configuration stored in this ViewHelper. Calls the expected-to-be-overridden stub method getConfiguration() to return the TCE field configuration - see that method for information about how to implement that method.
public build ( ) : array
return array
    public function build()
    {
        if (FALSE === $this->getEnable()) {
            return array();
        }
        $configuration = $this->buildConfiguration();
        $fieldStructureArray = array('label' => $this->getLabel(), 'exclude' => intval($this->getExclude()), 'config' => $configuration, 'displayCond' => $this->getDisplayCondition());
        if (TRUE === isset($configuration['defaultExtras'])) {
            $fieldStructureArray['defaultExtras'] = $configuration['defaultExtras'];
            unset($fieldStructureArray['config']['defaultExtras']);
        }
        $wizards = $this->buildChildren($this->wizards);
        if (TRUE === $this->getClearable()) {
            array_push($wizards, array('type' => 'userFunc', 'userFunc' => 'FluidTYPO3\\Flux\\UserFunction\\ClearValueWizard->renderField', 'params' => array('itemName' => $this->getName())));
        }
        $fieldStructureArray['config']['wizards'] = $wizards;
        if (TRUE === $this->getRequestUpdate()) {
            $fieldStructureArray['onChange'] = 'reload';
        }
        return $fieldStructureArray;
    }