Bolt\Config::parseTemplatefields PHP Method

parseTemplatefields() protected method

This method pulls the templatefields config from the theme config and appends it to the contenttypes configuration.
protected parseTemplatefields ( )
    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'];
                    }
                }
            }
        }
    }