1 author_from_node.inc LayoutRelationshipAuthorFromNode::getAdminSummary()

Return a summary for this relationship.

Overrides LayoutRelationship::getAdminSummary

File

core/modules/layout/plugins/relationships/author_from_node.inc, line 41
Provides relationship to relate the Author from a piece of content (node).

Class

LayoutRelationshipAuthorFromNode
@file Provides relationship to relate the Author from a piece of content (node).

Code

function getAdminSummary() {
  if (!empty($this->settings['context_parent'])) {
    list($label, $value) = explode(':', $this->settings['context_parent']);
    if ($label == 'position') {
      return t('Author of content in position @position', array('@position' => $value + 1));
    }
    else {
      return t('Author of content @id', array('@id' => $value));
    }
  }
  return t('Author of content');
}