I am trying to dynamically change App name and some components config Using component event: Please refer to the attached image, I have highlighted with red marker which part i want to set in my component.
My component code is following:
<?php
namespace common\components;
use Yii;
use common\models\AppPartner;
class Arun Extends \yii\base\Behavior{
public function events()
{
return [
\yii\web\Application::EVENT_BEFORE_REQUEST => 'getAppData',
];
}
public function getAppData(){
// want to change stuff here
}
}