function panels_get_layout_builders in Panels 7.3
Same name and namespace in other branches
- 6.3 includes/plugins.inc \panels_get_layout_builders()
Fetch metadata for all layout plugins that provide builders.
The layout builders allow reusable layouts be stored in the database and exported. Since there are different methods, we are not limiting this to just one plugin.
Return value
An array of arrays with information about panel layouts with builders.
2 calls to panels_get_layout_builders()
- panels_layouts_ui::hook_menu in plugins/
export_ui/ panels_layouts_ui.class.php - hook_menu() entry point.
- panels_layouts_ui::list_form in plugins/
export_ui/ panels_layouts_ui.class.php - Create the filter/sort form at the top of a list of exports.
File
- includes/
plugins.inc, line 303 - Contains helper code for plugins and contexts.
Code
function panels_get_layout_builders() {
ctools_include('plugins');
$plugins = ctools_get_plugins('panels', 'layouts');
$builders = array();
foreach ($plugins as $name => $plugin) {
if (!empty($plugin['builder'])) {
$builders[$name] = $plugin;
}
}
return $builders;
}