/** * @param DatagridEntity $source * @param Callable $callback * * @return DatagridEntity */ public function addTranslationSupport(DatagridEntity $source, $callback = null) { $locale = $this->systemCore->getApplicationCore()->getEditLocale(); $source->manipulateQuery(function (QueryBuilder $query) use($source, $locale, $callback) { $this->addQueryTranslationSupport($query, $source, $locale); if (is_callable($callback)) { $callback($query); } }); return $source; }
/** * Get Globals * * @return array */ public function getGlobals() { $section = null; if ($this->systemCore->isLoaded()) { $section = $this->systemCore->getApplicationCore()->getSection(); } return array('section' => $section, 'project_title' => $this->container->getParameter('unifik_system.metadata.title'), 'project_description' => $this->container->getParameter('unifik_system.metadata.description'), 'project_keywords' => $this->container->getParameter('unifik_system.metadata.keywords')); }