/** * @return string * * TODO: check if not better handled through options */ private function getPropertyPath() { $propertyPath = $this->getOption('property_path'); if (null === $propertyPath) { $propertyPath = $this->config->getName(); if (null === $this->datalist->getOption('data_class')) { $propertyPath = '[' . $propertyPath . ']'; } } return $propertyPath; }
/** * @param \Twig_Environment $env * @param \Leapt\AdminBundle\Datalist\DatalistInterface $datalist * @return string * @throws \Exception */ public function renderDatalistFilters(\Twig_Environment $env, DatalistInterface $datalist) { $blockNames = ['datalist_filters', '_' . $datalist->getName() . '_filters']; return $this->renderBlock($env, $datalist, $blockNames, ['filters' => $datalist->getFilters(), 'datalist' => $datalist, 'submit' => $datalist->getOption('filter_submit'), 'reset' => $datalist->getOption('filter_reset'), 'url' => $this->container->get('request_stack')->getCurrentRequest()->getPathInfo()]); }