Exemplo n.º 1
0
 public function executeRemove($request)
 {
     $this->checkEntity($request, false, false);
     //need an object for all the deletion logic
     //get related ids for cache clearing
     $entityIds = EntityTable::getRelatedEntityIdsById($this->entity['id']);
     $listIds = EntityTable::getListIdsById($this->entity['id']);
     $this->entity->delete();
     $this->clearCache($this->entity);
     foreach ($entityIds as $entityId) {
         LsCache::clearEntityCacheById($entityId);
     }
     foreach ($listIds as $listId) {
         LsCache::clearListCacheById($listId);
     }
     $this->redirect('@homepage');
 }