function panelizer_default_list_or_settings_page in Panelizer 7.3
Page callback to delegate to either the settings page or list page.
1 string reference to 'panelizer_default_list_or_settings_page'
- PanelizerEntityDefault::add_admin_links in plugins/
entity/ PanelizerEntityDefault.class.php - Helper function to add administrative menu items into an entity's already existing structure.
File
- ./
panelizer.module, line 838 - The Panelizer module attaches panels to entities, providing default panels and allowing each panel to be configured independently by privileged users.
Code
function panelizer_default_list_or_settings_page($handler, $bundle, $name, $view_mode, $operation = 'list', $item = NULL) {
if (is_string($handler)) {
$handler = panelizer_entity_plugin_get_handler($handler);
}
// We need a version of $bundle with $view_mode but we need to retain one
// without it so we can pass straight $bundle to the settings page.
$test_bundle = $bundle;
if ($view_mode) {
$test_bundle .= '.' . $view_mode;
}
if ($handler
->has_panel_choice($test_bundle)) {
// Call through to the UI switcher for the list.
ctools_include('export-ui');
return panelizer_export_ui_switcher_page($handler, $test_bundle, 'panelizer_defaults', $operation, $item);
}
else {
return panelizer_default_settings_page($handler, $bundle, $name, $view_mode);
}
}