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