You are here

function _twig_get_db_templates in Twig Input Filter 7

Returns all templates from the database.

2 calls to _twig_get_db_templates()
_twig_render in ./twig.utils.inc
Renders a template with a given context.
_twig_template_field_allowed_values in ./twig.field.inc
Callback: returns allowed values for the Twig template field.

File

./twig.utils.inc, line 35
Helper functions for the Twig module.

Code

function _twig_get_db_templates() {
  $templates = array();
  module_load_include('inc', 'ctools', 'includes/export');
  foreach (ctools_export_crud_load_all('twig_template') as $key => $template) {
    $templates[$key] = $template->template;
  }
  return $templates;
}