W3cubDocs

/Drupal 8

public function EntityFormInterface::getEntityFromRouteMatch

public EntityFormInterface::getEntityFromRouteMatch(RouteMatchInterface $route_match, $entity_type_id)

Determines which entity will be used by this form from a RouteMatch object.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

string $entity_type_id: The entity type identifier.

Return value

\Drupal\Core\Entity\EntityInterface The entity object as determined from the passed-in route match.

File

core/lib/Drupal/Core/Entity/EntityFormInterface.php, line 71

Class

EntityFormInterface
Defines an interface for entity form classes.

Namespace

Drupal\Core\Entity

Code

public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entity_type_id);

© 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!Entity!EntityFormInterface.php/function/EntityFormInterface::getEntityFromRouteMatch/8.1.x