You are here

function panels_bootstrap_merge_plugin in Panels Bootstrap Layout Builder 7

Same name and namespace in other branches
  1. 7.3 plugins/layouts/bootstrap/bootstrap.inc \panels_bootstrap_merge_plugin()

Merge the main bootstrap plugin with a layout to create a sub plugin.

This is used for both panels_bootstrap_get_sublayout and panels_bootstrap_get_sublayouts.

2 calls to panels_bootstrap_merge_plugin()
panels_bootstrap_get_sublayout in plugins/layouts/bootstrap/bootstrap.inc
Callback to provide a single stored bootstrap layout.
panels_bootstrap_get_sublayouts in plugins/layouts/bootstrap/bootstrap.inc
Callback to provide all stored bootstrap layouts.

File

plugins/layouts/bootstrap/bootstrap.inc, line 44

Code

function panels_bootstrap_merge_plugin($plugin, $layout) {
  $plugin['name'] = 'bootstrap:' . $layout->name;
  $plugin['category'] = !empty($layout->category) ? check_plain($layout->category) : t('Miscellaneous');
  $plugin['title'] = check_plain($layout->admin_title);
  $plugin['description'] = check_plain($layout->admin_description);
  $plugin['layout'] = $layout;
  $plugin['builder'] = FALSE;
  $plugin['builder tab title'] = NULL;
  return $plugin;
}