public function PanelizerEntityDefault::is_panelized in Panelizer 7.3
Same name and namespace in other branches
- 7.2 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::is_panelized()
Determine if a bundle is panelized.
Overrides PanelizerEntityInterface::is_panelized
9 calls to PanelizerEntityDefault::is_panelized()
- PanelizerEntityDefault::access_admin in plugins/
entity/ PanelizerEntityDefault.class.php - PanelizerEntityDefault::get_default_panelizer_objects in plugins/
entity/ PanelizerEntityDefault.class.php - Get the default panelizers for the given bundle.
- PanelizerEntityDefault::has_default_panel in plugins/
entity/ PanelizerEntityDefault.class.php - Determine if a bundle has a default display.
- PanelizerEntityDefault::has_panel_choice in plugins/
entity/ PanelizerEntityDefault.class.php - Determine if a bundle is allowed choices.
- PanelizerEntityDefault::hook_entity_insert in plugins/
entity/ PanelizerEntityDefault.class.php
File
- plugins/
entity/ PanelizerEntityDefault.class.php, line 2726 - Base class for the Panelizer Entity plugin.
Class
- PanelizerEntityDefault
- Base class for the Panelizer Entity plugin.
Code
public function is_panelized($bundle) {
if (strpos($bundle, '.') === FALSE) {
$has_bundle = !empty($this->plugin['bundles'][$bundle]);
$bundle_enabled = !empty($this->plugin['bundles'][$bundle]['status']);
return $has_bundle && $bundle_enabled;
}
else {
list($bundle, $view_mode) = explode('.', $bundle);
$has_bundle = !empty($this->plugin['bundles'][$bundle]);
$bundle_enabled = !empty($this->plugin['bundles'][$bundle]['status']);
$view_mode_enabled = !empty($this->plugin['bundles'][$bundle]['view modes'][$view_mode]['status']);
return $has_bundle && $bundle_enabled && $view_mode_enabled;
}
}