private function getLinkToTry()
    {
        if (strpos($this->controllerNamespace, Yii::getApp()->controllerNamespace) !== 0) {
            return '';
        }

        $actions = $this->getActionIDs();
        if (in_array('index', $actions, true)) {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/index';
        } else {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/' . reset($actions);
        }
        return ' You may ' . Html::a('try it now', Yii::getApp()->getUrlManager()->createUrl($route), ['target' => '_blank', 'rel' => 'noopener noreferrer']) . '.';
    }
private function getLinkToTry()
    {
        if (strpos($this->controllerNamespace, Yii::getApp()->controllerNamespace) !== 0) {
            return '';
        }

        $actions = $this->getActionIDs();
        if (in_array('index', $actions, true)) {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/index';
        } else {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/' . reset($actions);
        }
        return ' You may ' . Html::a('try it now', Yii::getApp()->getUrlManager()->createUrl($route), ['target' => '_blank', 'rel' => 'noopener noreferrer']) . '.';
    }
private function getLinkToTry ( ) { if ( strpos ( $ this -> controllerNamespace , Yii :: getApp ( ) -> controllerNamespace ) !== 0 ) { return '' ; } $ actions = $ this -> getActionIDs ( ) ; if ( in_array ( 'index' , $ actions , true ) ) { $ route = $ this -> getControllerSubPath ( ) . $ this -> getControllerID ( ) . '/index' ; } else { $ route = $ this -> getControllerSubPath ( ) . $ this -> getControllerID ( ) . '/' . reset ( $ actions ) ; } return ' You may ' . Html :: a ( 'try it now' , Yii :: getApp ( ) -> getUrlManager ( ) -> createUrl ( $ route ) , [ 'target' => '_blank' , 'rel' => 'noopener noreferrer' ] ) . '.' ; }
This method returns a link to try controller generated
@see https://github.com/yiisoft/yii2-gii/issues/182
@return string
@since 2.0.6
This method returns a link to try controller generated