public function render()
    {
        $table = $this->arguments['table'];
        $type = $this->arguments['type'];

        if (empty($GLOBALS['TCA'][$table])) {
            return [];
        }

        $fields = [];
        if ($type === 'Tab') {
            $fields = $this->fieldHelper->getFieldsByType($type, $table);
        } else {
            if (in_array($table, ['tt_content', 'pages'])) {
                foreach ($GLOBALS['TCA'][$table]['columns'] as $tcaField => $tcaConfig) {
                    if ($table === 'tt_content' || ($table === 'pages' && strpos($tcaField, 'tx_mask_') === 0)) {
                        $fieldType = $this->fieldHelper->getFormType($tcaField, '', $table);
                        if (($fieldType === $type || ($fieldType === 'Text' && $type === 'Richtext'))
                            && !in_array($tcaField, self::$forbiddenFields, true)
                        ) {
                            $fields[] = [
                                'field' => $tcaField,
                                'label' => $tcaConfig['label'],
                            ];
                        }
                    }
                }
            }
        }
        return $fields;
    }
public function render()
    {
        $table = $this->arguments['table'];
        $type = $this->arguments['type'];

        if (empty($GLOBALS['TCA'][$table])) {
            return [];
        }

        $fields = [];
        if ($type === 'Tab') {
            $fields = $this->fieldHelper->getFieldsByType($type, $table);
        } else {
            if (in_array($table, ['tt_content', 'pages'])) {
                foreach ($GLOBALS['TCA'][$table]['columns'] as $tcaField => $tcaConfig) {
                    if ($table === 'tt_content' || ($table === 'pages' && strpos($tcaField, 'tx_mask_') === 0)) {
                        $fieldType = $this->fieldHelper->getFormType($tcaField, '', $table);
                        if (($fieldType === $type || ($fieldType === 'Text' && $type === 'Richtext'))
                            && !in_array($tcaField, self::$forbiddenFields, true)
                        ) {
                            $fields[] = [
                                'field' => $tcaField,
                                'label' => $tcaConfig['label'],
                            ];
                        }
                    }
                }
            }
        }
        return $fields;
    }
public function render ( ) { $ table = $ this -> arguments [ 'table' ] ; $ type = $ this -> arguments [ 'type' ] ; if ( empty ( $ GLOBALS [ 'TCA' ] [ $ table ] ) ) { return [ ] ; } $ fields = [ ] ; if ( $ type === 'Tab' ) { $ fields = $ this -> fieldHelper -> getFieldsByType ( $ type , $ table ) ; } else { if ( in_array ( $ table , [ 'tt_content' , 'pages' ] ) ) { foreach ( $ GLOBALS [ 'TCA' ] [ $ table ] [ 'columns' ] as $ tcaField => $ tcaConfig ) { if ( $ table === 'tt_content' || ( $ table === 'pages' && strpos ( $ tcaField , 'tx_mask_' ) === 0 ) ) { $ fieldType = $ this -> fieldHelper -> getFormType ( $ tcaField , '' , $ table ) ; if ( ( $ fieldType === $ type || ( $ fieldType === 'Text' && $ type === 'Richtext' ) ) && ! in_array ( $ tcaField , self :: $ forbiddenFields , true ) ) { $ fields [ ] = [ 'field' => $ tcaField , 'label' => $ tcaConfig [ 'label' ] , ] ; } } } } } return $ fields ; }
Generates TCA Selectbox-Options-Array for a specific TCA-type.

@return array all TCA elements of this attribut
@author Gernot Ploiner <gp@webprofil.at>
@author Benjamin Butschell <bb@webprofil.at>
Generates TCA Selectbox - Options - Array for a specific TCA - type .