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