/** * {@inheritdoc} */ public function populateFromRouteMatch(RouteMatchInterface $route_match) { parent::populateFromRouteMatch($route_match); $entity = $route_match->getParameter($this->entityType); $this->setEntity($entity); }
/** * {@inheritdoc} */ public function populateFromRequest(Request $request) { parent::populateFromRequest($request); $entity = $request->attributes->get($this->entityType); $this->setEntity($entity); }