You are here

function PanelizerEntityDefault::panelizer_access in Panelizer 7.2

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

Determine if the user has access to the panelizer operation for this type.

2 calls to PanelizerEntityDefault::panelizer_access()
PanelizerEntityDefault::access_admin in plugins/entity/PanelizerEntityDefault.class.php
PanelizerEntityDefault::hook_field_attach_form in plugins/entity/PanelizerEntityDefault.class.php

File

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

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

function panelizer_access($op, $entity) {
  list($entity_id, $revision_id, $bundle) = entity_extract_ids($this->entity_type, $entity);
  return user_access('administer panelizer') || user_access("administer panelizer {$this->entity_type} {$bundle} {$op}");
}