function panelizer_has_no_choice_callback in Panelizer 7.2
Same name and namespace in other branches
- 6 panelizer.module \panelizer_has_no_choice_callback()
- 7.3 panelizer.module \panelizer_has_no_choice_callback()
- 7 panelizer.module \panelizer_has_no_choice_callback()
Menu callback to determine if a type has a choice of defaults.
We use this to make sure the right tabs appear.
2 string references to 'panelizer_has_no_choice_callback'
- PanelizerEntityDefault::add_admin_links in plugins/
entity/ PanelizerEntityDefault.class.php - Helper function to add administrative menu items into an entity's already existing structure.
- panelizer_admin_hook_menu in includes/
admin.inc - Delegated hook_menu for admin
File
- ./
panelizer.module, line 605 - The Panelizer module attaches panels to entities, providing default panels and allowing each panel to be configured independently by privileged users.
Code
function panelizer_has_no_choice_callback($handler, $bundle) {
if (is_string($handler)) {
$handler = panelizer_entity_plugin_get_handler($handler);
}
if (!$handler) {
return FALSE;
}
if (!panelizer_administer_entity_bundle($handler, $bundle)) {
return FALSE;
}
return $handler
->has_default_panel($bundle) && !$handler
->has_panel_choice($bundle);
}