class AdminPathConfigEntityConverter

Makes sure the unmodified ConfigEntity is loaded on admin pages.

Converts entity route arguments to unmodified entities as opposed to converting to entities with overrides, such as the negotiated language.

This converter applies only if the path is an admin path, the entity is a config entity, and the "with_config_overrides" element is not set to TRUE on the parameter definition.

Due to this converter having a higher weight than the default EntityConverter, every time this applies, it takes over the conversion duty from EntityConverter. As we only allow a single converter per route argument, EntityConverter is ignored when this converter applies.

Hierarchy

File

core/lib/Drupal/Core/ParamConverter/AdminPathConfigEntityConverter.php, line 25

Namespace

Drupal\Core\ParamConverter

Members

Name Modifiers Type Description
AdminPathConfigEntityConverter::$adminContext protected property The route admin context to determine whether a route is an admin one.
AdminPathConfigEntityConverter::$configFactory protected property The config factory.
AdminPathConfigEntityConverter::applies public function Determines if the converter applies to a specific route and variable. Overrides EntityConverter::applies
AdminPathConfigEntityConverter::convert public function Converts path variables to their corresponding objects. Overrides EntityConverter::convert
AdminPathConfigEntityConverter::__construct public function Constructs a new EntityConverter. Overrides EntityConverter::__construct
EntityConverter::$entityManager protected property Entity manager which performs the upcasting in the end.
EntityConverter::getEntityTypeFromDefaults protected function Determines the entity type ID given a route definition and route defaults.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!ParamConverter!AdminPathConfigEntityConverter.php/class/AdminPathConfigEntityConverter/8.1.x