public function actionComponent($name = null)
    {
        $data = Yii::$app->getComponents();
        if ($name) {
            if (empty($data[$name])) {
                Yii::error("'$name' not defined");

                return;
            }
            $data = [$name => $data[$name]];
        }
        echo Yaml::dump($data, 4);
    }