Esempio n. 1
0
 /**
  * @param object      $object
  * @param string|null $action
  *
  * @return array
  */
 public function getActionParams($object, $action = null)
 {
     if (!is_object($object)) {
         return [];
     }
     return $this->entityRoutingHelper->getRouteParameters($this->getClassName($object, true), $this->entityIdAccessor->getIdentifier($object), $action);
 }
 public function testGetRouteParametersWithoutAction()
 {
     $this->assertEquals([EntityRoutingHelper::PARAM_ENTITY_CLASS => 'Acme_Bundle_TestClass', EntityRoutingHelper::PARAM_ENTITY_ID => '123'], $this->entityRoutingHelper->getRouteParameters('Acme\\Bundle\\TestClass', 123));
 }