예제 #1
0
 public function getItemElement()
 {
     $element = new Element('li');
     $link = new Link('#', $this->getItemName());
     $link->setAttribute('data-tree-action', $this->getAction());
     $link->setAttribute('dialog-title', $this->getDialogTitle());
     $link->setAttribute('data-tree-action-url', $this->getActionURL());
     $element->appendChild($link);
     return $element;
 }
예제 #2
0
 public function getMenuItemLinkElement()
 {
     $a = new Link();
     $a->setValue('');
     if ($this->menuItem->getIcon()) {
         $icon = new Element('i');
         $icon->addClass('fa fa-' . $this->menuItem->getIcon());
         $a->appendChild($icon);
     }
     if ($this->menuItem->getLink()) {
         $a->href($this->menuItem->getLink());
     }
     foreach ($this->menuItem->getLinkAttributes() as $key => $value) {
         $a->setAttribute($key, $value);
     }
     // Set styling for accessiblity options
     if (Config::get('concrete.accessibility.toolbar_large_font')) {
         $spacing = 'padding-top: 15px';
         $height = 'line-height:17px;';
     } else {
         $spacing = 'padding: 16px 5px;';
         $height = 'line-height:14px;';
     }
     $wbTitle = new Element('div');
     $wbTitle->style($height . $spacing);
     $wbTitle->addClass('wb-fourms')->setValue($this->menuItem->getLabel());
     $a->appendChild($wbTitle);
     return $a;
 }
 public function getMenuItemLinkElement()
 {
     $link = new Link('#', '');
     $link->setAttribute('data-panel-url', \URL::to('/ccm/system/panels/page/relations'));
     $link->setAttribute('title', t('View related pages'));
     $link->setAttribute('data-launch-panel', 'page_relations');
     if (is_object($this->multilingualSection)) {
         $icon = $this->flagService->getFlagIcon($this->multilingualSection->getIcon());
         $accessibility = new Element('span', $this->multilingualSection->getLanguageText());
         $accessibility->addClass('ccm-toolbar-accessibility-title');
         $link->appendChild($icon);
         $link->appendChild($accessibility);
     } else {
         $icon = new Element('i', '');
         $icon->addClass('fa fa-sitemap');
         $accessibility = new Element('span', t('Related Pages'));
         $accessibility->addClass('ccm-toolbar-accessibility-title');
         $link->appendChild($icon);
         $link->appendChild($accessibility);
     }
     return $link;
 }
예제 #4
0
 public function getMenuItemLinkElement()
 {
     $a = new Link();
     $a->setValue('');
     if ($this->menuItem->getIcon()) {
         $icon = new Element('i');
         $icon->addClass('fa fa-' . $this->menuItem->getIcon());
         $a->appendChild($icon);
     }
     if ($this->menuItem->getLink()) {
         $a->href($this->menuItem->getLink());
     }
     foreach ($this->menuItem->getLinkAttributes() as $key => $value) {
         $a->setAttribute($key, $value);
     }
     $label = new Element('span');
     $label->addClass('ccm-toolbar-accessibility-title')->setValue($this->menuItem->getLabel());
     $a->appendChild($label);
     return $a;
 }