delete() public method

Delete the route item from the repository
public delete ( InstanceRoute $route ) : boolean | null
$route InstanceRoute route instance
return boolean | null
Exemplo n.º 1
0
 /**
  * Destroy menu type associated with the menu item.
  *
  * @param MenuItem $item menu item instance
  * @return void
  */
 protected function destroyMenuType(MenuItem $item)
 {
     $menuTypeObj = $this->modules->getModuleObject($item->type);
     $menuTypeObj->deleteMenu($item->getKey());
     if ($menuTypeObj::isRouteAble()) {
         $instanceRoute = $this->routes->findByInstanceId($item->getKey());
         $this->routes->delete($instanceRoute);
     }
 }
Exemplo n.º 2
0
 /**
  * Delete the route item from the repository
  *
  * @param InstanceRoute $route route instance
  * @return bool|null
  */
 public function delete(InstanceRoute $route)
 {
     $this->cache->forget($this->getCacheKey($route->siteKey . '_' . $route->url));
     $this->cache->forget($this->getCacheKey($route->instanceId));
     return $this->repo->delete($route);
 }
Exemplo n.º 3
0
 /**
  * Delete the route item from the repository
  *
  * @param InstanceRoute $route route instance
  * @return bool|null
  */
 public function delete(InstanceRoute $route)
 {
     $this->unsetFromMap($route);
     return $this->repo->delete($route);
 }