Example #1
0
 public function run()
 {
     $tags = BlogTag::findTagWeights();
     $str = '';
     foreach ($tags as $tag => $weight) {
         $link = Html::a(Html::encode($tag), Yii::$app->getUrlManager()->createUrl(['blog/default/index', 'tag' => $tag]));
         $str .= Html::tag('span', $link, ['class' => 'tag', 'style' => "font-size:{$weight}pt"]) . "\n";
     }
     return $this->render('portal', ['title' => $this->title, 'content' => $str]);
 }