public function run() { Assets::register($this->getView()); $views = ''; foreach ($this->networks as $network => $params) { $views .= $this->render(strtolower($network), ['title' => $this->title, 'url' => $this->url], true); } return $this->render('sharebar', ['views' => $views]); }
public function run() { Assets::register($this->getView()); $views = ''; foreach ($this->networks as $network => $params) { $views .= $this->render(strtolower($params), ['title' => $this->title, 'media' => $this->media, 'url' => Yii::$app->request->absoluteUrl], true); } return $this->render('sharebar', ['views' => $views]); }