Beispiel #1
0
 /**
  * Action for AJAX request
  *
  * @return void
  */
 public function execute()
 {
     $viewIds = explode('.', $this->_request->getParam('data'));
     $bookmark = $this->bookmarkManagement->getByIdentifierNamespace(array_pop($viewIds), $this->_request->getParam('namespace'));
     if ($bookmark && $bookmark->getId()) {
         $this->bookmarkRepository->delete($bookmark);
     }
 }
Beispiel #2
0
 /**
  * Check bookmark by identifier
  *
  * @param string $identifier
  * @return bool|BookmarkInterface
  */
 protected function checkBookmark($identifier)
 {
     $result = false;
     $updateBookmark = $this->bookmarkManagement->getByIdentifierNamespace($identifier, $this->_request->getParam('namespace'));
     if ($updateBookmark) {
         $result = $updateBookmark;
     }
     return $result;
 }