/**
  * Create a dropdown containing the page tools (page, talk, edit, history,
  * ...)
  *
  * @param \DOMElement $domElement
  *
  * @return string
  */
 protected function getPageTools(\DOMElement $domElement = null)
 {
     $ret = '';
     $pageTools = new PageTools($this->getSkinTemplate(), $domElement, $this->getIndent() + 1);
     $pageTools->setFlat(true);
     $pageTools->removeClasses('text-center list-inline');
     $pageTools->addClasses('dropdown-menu');
     $editLinkHtml = '';
     $pageToolsStructure = $pageTools->getPageToolsStructure();
     if (array_key_exists('views', $pageToolsStructure) && array_key_exists('form_edit', $pageToolsStructure['views']) && array_key_exists('sfgRenameEditTabs', $GLOBALS) && $GLOBALS['sfgRenameEditTabs'] === true) {
         $editLinkHtml = $this->getLinkAndRemoveFromPageToolStructure($pageTools, 'form_edit');
     } elseif (array_key_exists('views', $pageToolsStructure) && array_key_exists('ve-edit', $pageToolsStructure['views'])) {
         $editLinkHtml = $this->getLinkAndRemoveFromPageToolStructure($pageTools, 've-edit');
     } elseif (array_key_exists('views', $pageToolsStructure) && array_key_exists('edit', $pageToolsStructure['views'])) {
         $editLinkHtml = $this->getLinkAndRemoveFromPageToolStructure($pageTools, 'edit');
     }
     $pageToolsHtml = $pageTools->getHtml();
     if ($editLinkHtml || $pageToolsHtml) {
         $ret = $this->indent() . '<!-- page tools -->' . $this->indent() . '<ul class="navbar-tools navbar-nav" >';
         if ($editLinkHtml !== '') {
             $ret .= $this->indent(1) . $editLinkHtml;
         }
         if ($pageToolsHtml !== '') {
             $ret .= $this->indent(1) . '<li class="navbar-tools-tools dropdown">' . $this->indent(1) . '<a data-toggle="dropdown" class="dropdown-toggle" href="#" title="' . $this->getSkinTemplate()->getMsg('specialpages-group-pagetools')->text() . '" ><span>...</span></a>' . $pageToolsHtml . $this->indent(-1) . '</li>';
         }
         $ret .= $this->indent(-1) . '</ul>' . "\n";
     }
     return $ret;
 }
 /**
  * Create a dropdown containing the page tools (page, talk, edit, history, ...)
  *
  * @param \DOMElement $domElement
  *
  * @return string
  */
 protected function getPageTools(\DOMElement $domElement = null)
 {
     $pageTools = new PageTools($this->getSkinTemplate(), $domElement, $this->getIndent());
     $pageTools->setFlat(true);
     $pageTools->removeClasses('text-center list-inline');
     $pageTools->addClasses('dropdown-menu');
     $ret = $pageTools->getHtml();
     if ($ret !== '') {
         $ret = $this->indent() . '<!-- page tools -->' . $this->indent() . \Html::openElement('li', array('class' => 'dropdown')) . $this->indent(1) . '<a data-toggle="dropdown" class="dropdown-toggle" href="#">Page Tools <b class="caret"></b></a>' . $ret . $this->indent(-1) . '</li>' . "\n";
     }
     return $ret;
 }