1 path_layout_access.inc PathLayoutAccess::summary()

Provides a human-readable summary of this access check's behavior.

Parameters

$contexts: An array containing available contexts.

Return value

string: The sanitized HTML summary string for this access check.

Overrides LayoutAccess::summary

File

core/modules/layout/plugins/access/path_layout_access.inc, line 21
Plugin to provide access control/visibility based on path.

Class

PathLayoutAccess
@file Plugin to provide access control/visibility based on path.

Code

function summary() {
  $paths = explode("\n", $this->settings['paths']);
  if ($this->settings['visibility_setting']) {
    return format_plural(count($paths), 'Current path is "@paths"', 'Current path is one of "@paths"', array('@paths' => implode(', ', $paths)));
  }
  else {
    return format_plural(count($paths), 'Current path is not "@paths"', 'Current path is not one of "@paths"', array('@paths' => implode(', ', $paths)));
  }
}