/** * @inheritdoc */ public function run() { if (\Yii::$app->user->isGuest) { return; } return $this->render('notificationSwitchLink', array('content' => $this->content->content, 'state' => $this->content->isFollowedByUser(\Yii::$app->user->id, true))); }