1 entity_layout_context_handler.inc EntityLayoutContext::getAdminSummary($path = NULL)

Return a summary for this context.

Overrides LayoutContext::getAdminSummary

File

core/modules/layout/plugins/context/entity_layout_context_handler.inc, line 91
Layout context handler for entities.

Class

EntityLayoutContext
@file Layout context handler for entities.

Code

function getAdminSummary($path = NULL) {
  $info = entity_get_info($this->entity_type);
  if ($this->position) {
    $argument_parts = explode('/', $path);
    $argument_parts[$this->position] = '<strong>' . $argument_parts[$this->position] . '</strong>';

    return t('Position @index:', array('@index' => $this->position + 1)) . ' ' . implode('/', $argument_parts);
  }
  else {
    return t('@entity ID: @id', array('@id' => $this->settings['id'], '@entity' => $info['label']));
  }
}