1 layout.class.inc Layout::checkAccess()

Check access to this layout based on the current contexts.

This method is generally called on all layouts that share the same path. The first layout that grants access will be used to render the page, and if no layouts grant access, then Layout module will fall through to using the default site-wide layout.

File

core/modules/layout/includes/layout.class.inc, line 1001
Class for loading, modifying, and executing a layout.

Class

Layout
@file Class for loading, modifying, and executing a layout.

Code

function checkAccess() {
  $contexts = $this->getContexts();
  foreach ($this->conditions as $condition) {
    $condition->setContexts($contexts);
    if (!$condition->checkAccess()) {
      return FALSE;
    }
  }
  return TRUE;
}