NodeController::revisionPageTitle

public NodeController::revisionPageTitle($node_revision)

Page title callback for a node revision.

Parameters

int $node_revision: The node revision ID.

Return value

string The page title.

File

core/modules/node/src/Controller/NodeController.php, line 145

Class

NodeController
Returns responses for Node routes.

Namespace

Drupal\node\Controller

Code

public function revisionPageTitle($node_revision) {
  $node = $this->entityManager()->getStorage('node')->loadRevision($node_revision);
  return $this->t('Revision of %title from %date', array('%title' => $node->label(), '%date' => format_date($node->getRevisionCreationTime())));
}
doc_Drupal
2016-10-29 09:30:38
Comments
Leave a Comment

Please login to continue.