function PanelizerEntityDefault::access_admin in Panelizer 7.2
Same name and namespace in other branches
- 7.3 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::access_admin()
File
- plugins/
entity/ PanelizerEntityDefault.class.php, line 999 - Base class for the Panelizer Entity plugin.
Class
- PanelizerEntityDefault
- Base class for the Panelizer Entity plugin.
Code
function access_admin($entity, $op = NULL) {
list($entity_id, $revision_id, $bundle) = entity_extract_ids($this->entity_type, $entity);
if (!$this
->is_panelized($bundle)) {
return FALSE;
}
// If there is an $op, this must actually be panelized in order to pass.
// If there is no op, then the settings page can provide us a "panelize it!"
// page even if there is no panel.
if ($op && $op != 'settings' && empty($entity->panelizer)) {
return FALSE;
}
return $this
->panelizer_access($op, $entity) && $this
->entity_access('update', $entity);
}