You are here

public function PanelizerEntityDefault::has_panel_choice in Panelizer 7.3

Same name and namespace in other branches
  1. 7.2 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::has_panel_choice()

Determine if a bundle is allowed choices.

Overrides PanelizerEntityInterface::has_panel_choice

1 call to PanelizerEntityDefault::has_panel_choice()
PanelizerEntityDefault::hook_field_attach_form in plugins/entity/PanelizerEntityDefault.class.php

File

plugins/entity/PanelizerEntityDefault.class.php, line 2769
Base class for the Panelizer Entity plugin.

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function has_panel_choice($bundle) {
  if (strpos($bundle, '.') === FALSE) {
    $bundle .= '.page_manager';
  }
  list($bundle, $view_mode) = explode('.', $bundle);
  return $this
    ->is_panelized($bundle) && !empty($this->plugin['bundles'][$bundle]['view modes'][$view_mode]['choice']);
}