Habari\FormControl::prep_theme PHP Method

prep_theme() public method

public prep_theme ( Theme $theme_obj ) : Theme
$theme_obj Theme
return Theme
    public function prep_theme(Theme $theme_obj)
    {
        if ($theme_obj->_processed_control_templates) {
            return $theme_obj;
        }
        // Add the templates for the form controls to the current theme,
        // and allow any matching templates from the current theme to override
        $control_templates_dir = Plugins::filter('control_templates_dir', HABARI_PATH . '/system/controls/templates', $this);
        $theme_obj->template_engine->queue_dirs($control_templates_dir);
        $theme_obj->_processed_control_templates = true;
        return $theme_obj;
    }