You are here

function PanelizerEntityDefault::access_admin in Panelizer 7.3

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

File

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

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

function access_admin($entity, $op = NULL, $view_mode = NULL) {
  list($entity_id, $revision_id, $bundle) = entity_extract_ids($this->entity_type, $entity);
  if ($view_mode) {
    $bundle .= '.' . $view_mode;
  }
  else {
    $view_mode = 'page_manager';
  }
  if (!$this
    ->is_panelized($bundle)) {
    return FALSE;
  }
  return $this
    ->panelizer_access($op, $entity, $view_mode) && $this
    ->entity_access('update', $entity);
}