private function generateHtml($href, $isActive, $lang)
    {
        if (!isset(static::$registerLinkTags[$href])) {
            $this->view->registerLinkTag(['rel' => 'alternate', 'hreflang' => $lang['short_code'], 'href' => Yii::$app->urlManager->hostInfo . $href]);
            static::$registerLinkTags[$href] = true;
        }
        $elementOptions = $this->elementOptions;
        $linkOptions = $this->linkOptions;
        
        if ($isActive) {
            if (isset($linkOptions['class'])) {
                $linkOptions['class'] = $linkOptions['class'] . ' ' . $this->linkActiveClass;
            } else {
                $linkOptions['class'] = $this->linkActiveClass;
            }
         
            if (isset($elementOptions['class'])) {
                $elementOptions['class'] = $elementOptions['class'] . ' ' . $this->elementActiveClass;
            } else {
                $elementOptions['class'] = $this->elementActiveClass;
            }
        }
        
        $tag = ArrayHelper::remove($elementOptions, 'tag', 'li');
        
        $text = is_callable($this->linkLabel) ? call_user_func($this->linkLabel, $lang) : $lang[$this->linkLabel];
        
        return Html::tag($tag, Html::a($text, $href, $linkOptions), $elementOptions);
    }
private function generateHtml($href, $isActive, $lang)
    {
        if (!isset(static::$registerLinkTags[$href])) {
            $this->view->registerLinkTag(['rel' => 'alternate', 'hreflang' => $lang['short_code'], 'href' => Yii::$app->urlManager->hostInfo . $href]);
            static::$registerLinkTags[$href] = true;
        }
        $elementOptions = $this->elementOptions;
        $linkOptions = $this->linkOptions;
        
        if ($isActive) {
            if (isset($linkOptions['class'])) {
                $linkOptions['class'] = $linkOptions['class'] . ' ' . $this->linkActiveClass;
            } else {
                $linkOptions['class'] = $this->linkActiveClass;
            }
         
            if (isset($elementOptions['class'])) {
                $elementOptions['class'] = $elementOptions['class'] . ' ' . $this->elementActiveClass;
            } else {
                $elementOptions['class'] = $this->elementActiveClass;
            }
        }
        
        $tag = ArrayHelper::remove($elementOptions, 'tag', 'li');
        
        $text = is_callable($this->linkLabel) ? call_user_func($this->linkLabel, $lang) : $lang[$this->linkLabel];
        
        return Html::tag($tag, Html::a($text, $href, $linkOptions), $elementOptions);
    }
private function generateHtml ( $ href , $ isActive , $ lang ) { if ( ! isset ( static :: $ registerLinkTags [ $ href ] ) ) { $ this -> view -> registerLinkTag ( [ 'rel' => 'alternate' , 'hreflang' => $ lang [ 'short_code' ] , 'href' => Yii :: $ app -> urlManager -> hostInfo . $ href ] ) ; static :: $ registerLinkTags [ $ href ] = true ; } $ elementOptions = $ this -> elementOptions ; $ linkOptions = $ this -> linkOptions ; if ( $ isActive ) { if ( isset ( $ linkOptions [ 'class' ] ) ) { $ linkOptions [ 'class' ] = $ linkOptions [ 'class' ] . ' ' . $ this -> linkActiveClass ; } else { $ linkOptions [ 'class' ] = $ this -> linkActiveClass ; } if ( isset ( $ elementOptions [ 'class' ] ) ) { $ elementOptions [ 'class' ] = $ elementOptions [ 'class' ] . ' ' . $ this -> elementActiveClass ; } else { $ elementOptions [ 'class' ] = $ this -> elementActiveClass ; } } $ tag = ArrayHelper :: remove ( $ elementOptions , 'tag' , 'li' ) ; $ text = is_callable ( $ this -> linkLabel ) ? call_user_func ( $ this -> linkLabel , $ lang ) : $ lang [ $ this -> linkLabel ] ; return Html :: tag ( $ tag , Html :: a ( $ text , $ href , $ linkOptions ) , $ elementOptions ) ; }
Generate the item element.

@param string $href
@param boolean $isActive
@param array $lang
@return string
Generate the item element .