Author: XE Developers (developers@xpressengine.com)
Inheritance: extends Xpressengine\Category\Models\Category
示例#1
0
 /**
  * Delete menu config consisting of theme identifiers
  *
  * @param Menu $menu menu instance
  * @return void
  */
 public function deleteMenuTheme(Menu $menu)
 {
     $this->configs->removeByName($this->menuKeyString($menu->getKey()));
 }
 /**
  * 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)
 {
     $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)
 {
     unset($this->bag[$menu->getKey()]);
     return $this->repo->delete($menu);
 }
 /**
  * Delete menu
  *
  * @param Menu $menu menu instance
  * @return bool
  */
 public function delete(Menu $menu)
 {
     return $menu->delete();
 }
 /**
  * Increment item count
  *
  * @param Menu $menu   menu instance
  * @param int  $amount amount
  * @return bool
  */
 public function increment(Menu $menu, $amount = 1)
 {
     return $menu->increment($menu->getCountName(), $amount) > 0;
 }