/** * @param \Leapt\AdminBundle\Admin\ContentAdmin $admin * @param string $action * @param array $params * @return string */ public function getAdminContentPath($admin, $action, array $params = array()) { if (!$admin instanceof ContentAdmin) { $admin = $this->getAdminByCode($admin); } return $this->contentRoutingHelper->generateUrl($admin, $action, $params); }
/** * @param \Symfony\Component\Form\FormView $view * @param \Symfony\Component\Form\FormInterface $form * @param array $options */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['allow_add'] = $options['allow_add']; if ($options['allow_add']) { $view->vars['add_url'] = $this->routingHelper->generateUrl($this->adminManager->getAdmin($options['admin']), 'modalCreate'); $view->vars['add_label'] = $options['add_label']; } }
/** * @param array $options * @return string */ private function generateAddUrl(array $options) { return $this->routingHelper->generateUrl($options['admin'], 'modalCreate'); }
/** * @param DatalistActionInterface $action * @param $item * @param array $options * @return string */ public function getUrl(DatalistActionInterface $action, $item, array $options = array()) { $parameters = $this->getUrlParameters($item, $options); return $this->routingHelper->generateUrl($options['admin'], $options['action'], $parameters); }