That is a clear explanation, thank you very much. I don’t understand the need for the range of event handlers, but the basic understanding is more important for now. However, the set variable is unknown in the view ( [ Notice (8)](javascript:void(0);): Undefined variable: identity [ APP/View\AppView.php)
AppController.php
public function beforeRender(\Cake\Event\EventInterface $event){
parent::beforeRender($event);
$this->set(‘identity’, $this->request->getAttribute(‘identity’));
}
AppView.php
public function initialize(): void
{
echo $identity ? $identity->get(‘email’) : ‘Not logged in’;
#echo(‘a la playa’);
}
Is this due to the difference between Event $event and the way I used it ? (which was necessary to comply with a Controller file, probably by using the initial bake all command)