container = $container; } /** * @param AGridModuleEvent $event */ public function onModuleCacheUpdate(AGridModuleEvent $event) { $module = $event->getModule(); $colModule = $this->container->get('agrid.content_col_module.manager')->getByModule($module); // foreach ($cols as $col){ // $this->container->get('agrid.cache_service')->makeCache($colModule->getAGridCol()); // } } /** * @param AGridColEvent $event */ public function onColCacheUpdate(AGridColEvent $event){ // $this->container->get('agrid.row_manager')->makeCache($event->getCol()->getParentRow()); } /** * @param AGridRowEvent $event */ public function onRowCacheUpdate(AGridRowEvent $event){ $row = $event->getRow(); // if($row->getParentCol() != null){ // $this->container->get('agrid.col_manager')->makeCache($row->getParentCol()); // } else { // $this->container->get('agrid.content_manager')->makeCache($row->getParentContainer()); // } } /** * @param AGridContentEvent $event * @return bool */ public function onContentCacheUpdate(AGridContentEvent $event){ $content = $event->getContent(); /** * @var AGridPage $page */ $page = $this->container->get('agrid.page_manager')->getByContent($content); if ($page == null) return false; // $this->container->get('agrid.page_manager')->makeCache($page); return true; } }