Carbon_Fields\Helper\Helper::add_templates PHP Method

add_templates() public method

Adds the field/container template(s) to the templates stack.
public add_templates ( object $object )
$object object field or container object
    public function add_templates($object)
    {
        $templates = $object->get_templates();
        if (!$templates) {
            return false;
        }
        foreach ($templates as $name => $callback) {
            ob_start();
            call_user_func($callback);
            $html = ob_get_clean();
            // Add the template to the stack
            Templater::add_template($name, $html);
        }
    }