function layouter_templates in Layouter - WYSIWYG layout templates 7
Gets a list of our templates and associated forms.
What we're doing is making it easy to add more templates in just one place, which is often how it will work in the real world. If using CTools, what you would probably really have here, is a set of plugins for each template.
3 calls to layouter_templates()
- layouter_choose_layout in includes/
layouter.pages.inc - Callback for layouter/%ctools_js/% path.
- layouter_choose_layout_form in includes/
layouter.pages.inc - Returns form for choose a template.
- _layouter_process_layout_type_radios in includes/
layouter.inc - After-build callback.
File
- includes/
layouter.inc, line 132 - Functions for layout processing.
Code
function layouter_templates() {
$items = module_invoke_all('layouter_templates');
drupal_alter('layouter_templates', $items);
foreach ($items as &$item) {
$item['config title'] = t('Layout content');
}
return $items;
}