Exemple #1
0
/**
 * Return rendered template
 *
 * @param      $type - folder fo the partial
 * @param      $partial  - partial filename
 * @param null $data - data to inject to view (partial)
 * @param bool $return - if true return as variable, if false echo out
 *
 * @throws Exception
 */
function get_partial($type, $partial, $data = null, $return = false)
{
    $file_path = get_partial_path($type, $partial);
    if ($return) {
        return renderInternal($file_path, $partial, $data, $return);
    }
    renderInternal($file_path, $partial, $data, $return);
}
Exemple #2
0
/**
 * Return rendered template
 *
 * @param      $type - folder fo the partial
 * @param      $partial  - partial filename
 * @param null $data - data to inject to view (partial)
 * @param bool $return - if true return as variable, if false echo out
 *
 * @throws Exception
 */
function get_partial_json($type, $partial, $data = null)
{
    $file_path = get_partial_path($type, $partial);
    return renderInternalJson($file_path, $partial, $data);
}