public function getBasePath() { if (php_sapi_name() === 'cli') { return Yii::getPathOfAlias('webroot.assets'); } return parent::getBasePath(); }