1 layout_context.inc LayoutContext::label()

Assemble a human-readable label of this object.

Overrides LayoutHandler::label

File

core/modules/layout/plugins/context/layout_context.inc, line 200
Class that holds information relating to a layout's context.

Class

LayoutContext
@file Class that holds information relating to a layout's context.

Code

function label() {
  if ($this->label) {
    return $this->label;
  }
  $info = layout_get_context_info($this->plugin);
  if (isset($this->position)) {
    $substitutions = array(
      '@label' => $info['title'],
      '@position' => $this->position + 1,
    );
    return t('@label from the path (in position @position)', $substitutions);
  }
  else {
    return check_plain($info['title']);
  }
}