Ejemplo n.º 1
0
 /**
  * Deletes menu item.
  *
  * @param string $prefix
  * @param string $key
  */
 public function deleteMenuItem($prefix, $key)
 {
     $menuItem = $this->navService->findMenuItem($prefix, $key);
     if ($menuItem !== null) {
         $this->navService->deleteMenuItem($menuItem);
     }
 }
 public function deleteItem(BOL_MenuItem $item)
 {
     $document = $this->navigationService->findDocumentByKey($item->getDocumentKey());
     $this->navigationService->deleteDocument($document);
     $this->navigationService->deleteMenuItem($item);
     $this->deleteLanguageKeyIfExists($item->getPrefix(), $item->getKey());
     $this->deleteLanguageKeyIfExists(self::LANG_PREFIX, $item->getKey() . "_title");
     $this->deleteLanguageKeyIfExists(self::LANG_PREFIX, $item->getKey() . "_content");
 }