In YII2, how to add a widget written by myself to the yii2 framework is shown in the figure for details.

  ios, question


The above is my configuration file, the error is not found. This class is in the folder: Project \ Components \ Stone.php.

Write wrong, first put him in the components directory.

Php'stone' => [
 'class' => 'app\components\Stone'

You can then use yii::$app->stone