You are here

function panelizer_is_panelized in Panelizer 7.3

Same name and namespace in other branches
  1. 6 panelizer.module \panelizer_is_panelized()
  2. 7 panelizer.module \panelizer_is_panelized()
  3. 7.2 panelizer.module \panelizer_is_panelized()

Menu callback to determine if a type has a choice of defaults.

Used to make sure the right tabs appear.

2 calls to panelizer_is_panelized()
panelizer_view_mode_extra_field_displays in ./panelizer.install
Check whether a view mode uses core display of fields and panelizer.
panelizer_workbench_moderation_node_history_view_alter in ./panelizer.module
Implements hook_workbench_moderation_node_history_view_alter().
1 string reference to 'panelizer_is_panelized'
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 1037
The Panelizer module attaches panels to entities, providing default panels and allowing each panel to be configured independently by privileged users.

Code

function panelizer_is_panelized($handler, $bundle, $view_mode = NULL) {
  if (is_string($handler)) {
    $handler = panelizer_entity_plugin_get_handler($handler);
  }
  if (!$handler) {
    return FALSE;
  }
  if ($view_mode) {
    $bundle .= '.' . $view_mode;
  }
  if (!panelizer_administer_entity_bundle($handler, $bundle)) {
    return FALSE;
  }
  return $handler
    ->is_panelized($bundle);
}