Mercurial > hg > isophonics-drupal-site
comparison core/modules/aggregator/src/FeedHtmlRouteProvider.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\aggregator; | |
4 | |
5 use Drupal\Core\Entity\EntityTypeInterface; | |
6 use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; | |
7 | |
8 /** | |
9 * Provides HTML routes for the feed entity type. | |
10 */ | |
11 class FeedHtmlRouteProvider extends AdminHtmlRouteProvider { | |
12 | |
13 /** | |
14 * {@inheritdoc} | |
15 */ | |
16 protected function getCanonicalRoute(EntityTypeInterface $entity_type) { | |
17 $route = parent::getCanonicalRoute($entity_type); | |
18 $route->setDefault('_title_controller', '\Drupal\aggregator\Controller\AggregatorController::feedTitle'); | |
19 | |
20 return $route; | |
21 } | |
22 | |
23 /** | |
24 * {@inheritdoc} | |
25 */ | |
26 protected function getEditFormRoute(EntityTypeInterface $entity_type) { | |
27 $route = parent::getEditFormRoute($entity_type); | |
28 | |
29 $route->setDefault('_title', 'Configure'); | |
30 | |
31 return $route; | |
32 } | |
33 | |
34 } |