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 142
Class that holds information relating to a layouts context.

Class

LayoutContext
@file Class that holds information relating to a layouts context.

Code

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