/** * Deletes a page * * @param string $id Form id * @return boolean */ private function delete($id) { $webPageId = $this->formMapper->fetchWebPageIdById($id); $this->webPageManager->deleteById($webPageId); $this->formMapper->deleteById($id); return true; }
/** * Deletes a page by its associated id * * @param string $id * @return boolean */ private function delete($id) { $webPageId = $this->pageMapper->fetchWebPageIdById($id); $this->menuWidget->deleteAllByWebPageId($webPageId); $this->webPageManager->deleteById($webPageId); $this->pageMapper->deleteById($id); return true; }
/** * Completely removes a post by its associated id * * @param string $id Post's id * @return boolean */ private function removeAllById($id) { // Remove a web page $webPageId = $this->postMapper->fetchWebPageIdById($id); $this->webPageManager->deleteById($webPageId); // Remove images $this->imageManager->delete($id); // And finally removal the post itself return $this->postMapper->deleteById($id); }
/** * Removes all posts associated with category id * * @param string $id Category's id * @return boolean */ private function removeAllPostsById($id) { $webPageIds = $this->postMapper->fetchAllWebPageIdsByCategoryId($id); // Remove associated web pages, first foreach ($webPageIds as $webPageId) { $this->webPageManager->deleteById($webPageId); } // And then remove all posts $this->postMapper->deleteAllByCategoryId($id); return true; }
/** * Removes product's web page * * @param string $id Product's id * @return boolean */ private function removeWebPageById($id) { $webPageId = $this->productMapper->fetchWebPageIdById($id); return $this->webPageManager->deleteById($webPageId); }
/** * Removes an album from web page collection * * @param string $albumId * @return boolean */ private function removeWebPage($albumId) { $webPageId = $this->albumMapper->fetchWebPageIdById($albumId); return $this->webPageManager->deleteById($webPageId); }
/** * Deletes an announce by its associated id * * @param string $id Announce id * @return boolean */ private function delete($id) { $webPageId = $this->announceMapper->fetchWebPageIdById($id); $this->webPageManager->deleteById($webPageId); return $this->announceMapper->deleteById($id); }