public function getTemplates(DataContainer $dataContainer): array
    {
        $config = array();
        $prefix = '';

        // MCW compatibility
        if ($dataContainer instanceof MultiColumnWizard) {
            $field = $dataContainer->strField;
            $table = $dataContainer->strTable;
        } else {
            $field = $dataContainer->field;
            $table = $dataContainer->table;
        }

        if (array_key_exists('eval', $GLOBALS['TL_DCA'][$table]['fields'][$field])) {
            $config = $GLOBALS['TL_DCA'][$table]['fields'][$field]['eval'];
        }

        if (array_key_exists('templatePrefix', $config)) {
            $prefix = $config['templatePrefix'];
        }

        return \Controller::getTemplateGroup($prefix);
    }
public function getTemplates(DataContainer $dataContainer): array
    {
        $config = array();
        $prefix = '';

        // MCW compatibility
        if ($dataContainer instanceof MultiColumnWizard) {
            $field = $dataContainer->strField;
            $table = $dataContainer->strTable;
        } else {
            $field = $dataContainer->field;
            $table = $dataContainer->table;
        }

        if (array_key_exists('eval', $GLOBALS['TL_DCA'][$table]['fields'][$field])) {
            $config = $GLOBALS['TL_DCA'][$table]['fields'][$field]['eval'];
        }

        if (array_key_exists('templatePrefix', $config)) {
            $prefix = $config['templatePrefix'];
        }

        return \Controller::getTemplateGroup($prefix);
    }
public function getTemplates ( DataContainer $ dataContainer ) : array { $ config = array ( ) ; $ prefix = '' ; // MCW compatibility if ( $ dataContainer instanceof MultiColumnWizard ) { $ field = $ dataContainer -> strField ; $ table = $ dataContainer -> strTable ; } else { $ field = $ dataContainer -> field ; $ table = $ dataContainer -> table ; } if ( array_key_exists ( 'eval' , $ GLOBALS [ 'TL_DCA' ] [ $ table ] [ 'fields' ] [ $ field ] ) ) { $ config = $ GLOBALS [ 'TL_DCA' ] [ $ table ] [ 'fields' ] [ $ field ] [ 'eval' ] ; } if ( array_key_exists ( 'templatePrefix' , $ config ) ) { $ prefix = $ config [ 'templatePrefix' ] ; } return \ Controller :: getTemplateGroup ( $ prefix ) ; }
Get all templates. A templatePrefix can be defined using eval.templatePrefix.

@param DataContainer $dataContainer The data container driver.

@return array

@SuppressWarnings(PHPMD.Superglobals)
Get all templates . A templatePrefix can be defined using eval . templatePrefix .