Skip to content
Snippets Groups Projects
Commit 2ad180e3 authored by Bojan Zivanovic's avatar Bojan Zivanovic
Browse files

Final changes for 8.1 rebase.

parent abfa4916
No related branches found
No related tags found
No related merge requests found
...@@ -3,5 +3,8 @@ ...@@ -3,5 +3,8 @@
"type": "drupal-module", "type": "drupal-module",
"description": "Provides expanded entity APIs, which will be moved to Drupal core one day.", "description": "Provides expanded entity APIs, which will be moved to Drupal core one day.",
"homepage": "http://drupal.org/project/entity", "homepage": "http://drupal.org/project/entity",
"license": "GPL-2.0+" "license": "GPL-2.0+",
"require": {
"drupal/core": "~8.1"
}
} }
...@@ -2,3 +2,5 @@ name: Entity ...@@ -2,3 +2,5 @@ name: Entity
description: Provides expanded entity APIs, which will be moved to Drupal core one day. description: Provides expanded entity APIs, which will be moved to Drupal core one day.
type: module type: module
core: 8.x core: 8.x
dependencies:
- system (>=8.1.0)
<?php
/**
* @file
* Contains \Drupal\entity\Controller\RevisionController.
*/
namespace Drupal\entity\Controller;
use Drupal\Core\Entity\Controller\EntityViewController;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides some controllers related with entity revisions.
*/
class RevisionController extends EntityViewController {
/**
* Provides a page to render a single entity revision.
*
* @param \Drupal\Core\Entity\EntityInterface $_entity_revision
* The Entity to be rendered. Note this variable is named $_entity_revision
* rather than $entity to prevent collisions with other named placeholders
* in the route.
* @param string $view_mode
* (optional) The view mode that should be used to display the entity.
* Defaults to 'full'.
*
* @return array
* A render array.
*/
public function view(EntityInterface $_entity_revision, $view_mode = 'full') {
return parent::view($_entity_revision, $view_mode);
}
}
...@@ -51,7 +51,7 @@ class RevisionRouteProvider implements EntityRouteProviderInterface { ...@@ -51,7 +51,7 @@ class RevisionRouteProvider implements EntityRouteProviderInterface {
$entity_type_id = $entity_type->id(); $entity_type_id = $entity_type->id();
$route = new Route($entity_type->getLinkTemplate('revision')); $route = new Route($entity_type->getLinkTemplate('revision'));
$route->addDefaults([ $route->addDefaults([
'_controller' => '\Drupal\entity\Controller\RevisionController::view', '_controller' => '\Drupal\Core\Entity\Controller\EntityViewController::viewRevision',
'_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::title', '_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::title',
]); ]);
$route->addRequirements([ $route->addRequirements([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment