Exemple #1
0
 /**
  * getMenuSpecificsItems,
  * allow to add some menu items in the right click of the menu.
  * Todo: plug a pollen event on it
  *
  * @return a string with specifics menu items
  */
 function getMenuSpecificsItems()
 {
     $strMenu = parent::getMenuSpecificsItems();
     //create a link
     $strLabel = _('Create Link');
     $strMenu .= "\n" . '<li><a href="javascript:createLink(\'' . urljsencode($this->getRelativePath()) . '\');" id="hideMenu" >' . $strLabel . '</a></li>';
     //show hide in menu
     $bVisible = $this->isShowInMenu();
     $strLabel = $bVisible ? _('Hide') : _('Show');
     $strVisible = $bVisible ? 'false' : 'true';
     $strMenu .= '<li><a href="javascript:setPageConfigVar(\'' . urljsencode($this->getRelativePath()) . '\',\'SHOW_IN_MENU\',' . $strVisible . ');" id="hideMenu" >' . $strLabel . '</a></li>';
     $bPublished = $this->isPublished();
     $strLabel = $bPublished ? _('Unpublish') : _('Publish');
     $strPublished = $bPublished ? 'false' : 'true';
     $strMenu .= "\n" . '<li><a href="javascript:setPageConfigVar(\'' . urljsencode($this->getRelativePath()) . '\',\'PUBLISHED\',' . $strPublished . ');" id="hideMenu" >' . $strLabel . '</a></li>';
     return $strMenu;
 }