/** * Renders the custom datatable filter. * * @param Twig_Environment $twig * @param AbstractDataTableView $datatable * @param AbstractColumn $column * @param integer $loopIndex * * @return mixed|string|void */ public function datatableFilterRender(Twig_Environment $twig, AbstractDataTableView $datatable, AbstractColumn $column, $loopIndex) { $filterType = $column->getFilterType() ?: 'text'; if ($filterProperty = $column->getFilterProperty()) { $filterColumnId = $datatable->getColumnIdByColumnName($filterProperty); } else { $filterColumnId = $loopIndex; } return $twig->render('WgUniversalDataTableBundle:Filters:filter_' . $filterType . '.html.twig', ['column' => $column, 'filterColumnId' => $filterColumnId]); }
/** * Is search column. * * @param AbstractColumn $column * * @return bool */ private function isSearchColumn(AbstractColumn $column) { if (null !== $column->getDql() && true === $column->getSearchable() && true === $column->getVisible()) { return true; } return false; }