You are here

public function PanelizerEntityTaxonomyTerm::entity_access in Panelizer 7.2

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

Determine if the current user has $op access on the $entity.

Overrides PanelizerEntityInterface::entity_access

File

plugins/entity/PanelizerEntityTaxonomyTerm.class.php, line 17
Class for the Panelizer taxonomy term entity plugin.

Class

PanelizerEntityTaxonomyTerm
Panelizer Entity taxonomy term plugin class.

Code

public function entity_access($op, $entity) {

  // This must be implemented by the extending class.
  if ($op == 'update' || $op == 'delete') {
    return taxonomy_term_edit_access($entity);
  }
  if ($op == 'view') {
    return TRUE;
  }
  return FALSE;
}