示例#1
0
 /**
  * @param NavbarEntityContract $entity
  * @param array $attrs
  *
  * @return string
  */
 private function renderBootstrapLink(NavbarEntityContract $entity, $attrs = [])
 {
     $attrs['class'] = $entity->class;
     $link = Html::tag('a', $attrs, $entity->renderBody($entity->renderIcon()));
     $container_attrs['title'] = $entity->title;
     if ($this->isActive($entity)) {
         $container_attrs['class'] = $this->config->active_link_class;
     }
     return Html::tag('li', $container_attrs, $link);
 }
示例#2
0
 /**
  *
  * @param NavbarEntityContract $entity
  * @param array $attrs
  * @return string
  */
 protected function renderLink(NavbarEntityContract $entity, $attrs = [])
 {
     $link = Html::tag($this->config->link_tag, $attrs, $entity->renderBody($entity->renderIcon()));
     if ($this->config->link_container_tag) {
         return $this->renderLinkContainer($entity, $link);
     }
     return $link;
 }