You are here

public function FacetapiDependencyRole::execute in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::execute()
  2. 7 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::execute()

Executes the dependency check.

Overrides FacetapiDependency::execute

File

plugins/facetapi/dependency_role.inc, line 16
Performs a dependency check against the passed content type.

Class

FacetapiDependencyRole
Adds a dependency on content type.

Code

public function execute() {
  global $user;
  if (1 != $user->uid) {
    $roles = array_filter($this->settings['roles']);
    if ($roles && !array_intersect_key($user->roles, $roles)) {
      return FALSE;
    }
  }
}