protected function parseTemplatefields()
    {
        $theme = $this->data['theme'];

        if (isset($theme['templatefields'])) {
            foreach ($this->data['contenttypes'] as $key => $ct) {
                foreach ($ct['fields'] as $field) {
                    if (isset($field['type']) && $field['type'] === 'templateselect') {
                        $this->data['contenttypes'][$key]['templatefields'] = $theme['templatefields'];
                    }
                }
            }
        }
    }
protected function parseTemplatefields()
    {
        $theme = $this->data['theme'];

        if (isset($theme['templatefields'])) {
            foreach ($this->data['contenttypes'] as $key => $ct) {
                foreach ($ct['fields'] as $field) {
                    if (isset($field['type']) && $field['type'] === 'templateselect') {
                        $this->data['contenttypes'][$key]['templatefields'] = $theme['templatefields'];
                    }
                }
            }
        }
    }
protected function parseTemplatefields ( ) { $ theme = $ this -> data [ 'theme' ] ; if ( isset ( $ theme [ 'templatefields' ] ) ) { foreach ( $ this -> data [ 'contenttypes' ] as $ key => $ ct ) { foreach ( $ ct [ 'fields' ] as $ field ) { if ( isset ( $ field [ 'type' ] ) && $ field [ 'type' ] === 'templateselect' ) { $ this -> data [ 'contenttypes' ] [ $ key ] [ 'templatefields' ] = $ theme [ 'templatefields' ] ; } } } } }
This method pulls the templatefields config from the theme config and appends it
to the contenttypes configuration.
This method pulls the templatefields config from the theme config and appends it to the contenttypes configuration .