public function initEnabled()
{
if ($this->inited) {
return;
}
if (!$this->enabled) {
return;
}
if (\Yii::$app->user->isGuest) {
$this->enabled = false;
return;
}
if (!$this->checkAccess() || Yii::$app->getRequest()->getIsAjax()) {
$this->enabled = false;
return;
}
}