delete() публичный Метод

Delete menu
public delete ( Menu $menu ) : boolean
$menu Xpressengine\Menu\Models\Menu menu instance
Результат boolean
Пример #1
0
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  * @throws CanNotDeleteMenuEntityHaveChildException
  */
 public function remove(Menu $menu)
 {
     if ($menu->items->count() > 0) {
         throw new CanNotDeleteMenuEntityHaveChildException();
     }
     $this->deleteMenuTheme($menu);
     return $this->repo->delete($menu);
 }
Пример #2
0
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  */
 public function delete(Menu $menu)
 {
     $this->cache->forget($this->getCacheKey($menu->siteKey . '_all'));
     $this->cache->forget($this->getCacheKey($menu->getKey()));
     return $this->repo->delete($menu);
 }
Пример #3
0
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  */
 public function delete(Menu $menu)
 {
     unset($this->bag[$menu->getKey()]);
     return $this->repo->delete($menu);
 }
Пример #4
0
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  */
 public function delete(Menu $menu)
 {
     $key = $this->getCacheKey($menu->getKey());
     $this->cache->forget($key);
     return $this->repo->delete($menu);
 }
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  */
 public function delete(Menu $menu)
 {
     return $this->repo->delete($menu);
 }