class CurrencyRouteProvider in Price 8
Same name and namespace in other branches
- 3.x src/CurrencyRouteProvider.php \Drupal\price\CurrencyRouteProvider
- 2.0.x src/CurrencyRouteProvider.php \Drupal\price\CurrencyRouteProvider
- 2.x src/CurrencyRouteProvider.php \Drupal\price\CurrencyRouteProvider
- 3.0.x src/CurrencyRouteProvider.php \Drupal\price\CurrencyRouteProvider
Provides routes for the Currency entity.
Hierarchy
- class \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider implements EntityHandlerInterface, EntityRouteProviderInterface
- class \Drupal\price\CurrencyRouteProvider
Expanded class hierarchy of CurrencyRouteProvider
File
- src/
CurrencyRouteProvider.php, line 11
Namespace
Drupal\priceView source
class CurrencyRouteProvider extends DefaultHtmlRouteProvider {
/**
* {@inheritdoc}
*/
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
$route = parent::getAddFormRoute($entity_type);
// Replace the "Add currency" title with "Add custom currency".
// The t() function is used to ensure the string is picked up for
// translation, even though _title is supposed to be untranslated.
$route
->setDefault('_title_callback', '');
$route
->setDefault('_title', t('Add custom currency')
->getUntranslatedString());
return $route;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CurrencyRouteProvider:: |
protected | function |
Gets the add-form route. Overrides DefaultHtmlRouteProvider:: |
|
DefaultHtmlRouteProvider:: |
protected | property | The entity field manager. | |
DefaultHtmlRouteProvider:: |
protected | property | The entity type manager. | |
DefaultHtmlRouteProvider:: |
public static | function |
Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface:: |
1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the add page route. | 2 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the canonical route. | 3 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the collection route. | 2 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the delete-form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Returns the delete multiple form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the edit-form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the type of the ID key for a given entity type. | 1 |
DefaultHtmlRouteProvider:: |
public | function |
Provides routes for entities. Overrides EntityRouteProviderInterface:: |
1 |
DefaultHtmlRouteProvider:: |
public | function | Constructs a new DefaultHtmlRouteProvider. | 1 |