How to use flash() with session in cakephp 3.3

I’m beginner in programming, i use cakephp 3.3 version and i want to understand how to activate session and use in controller and how to send flash message like this:$this->session->flash(‘items was updated’). What line have to add to activate session and where, how to use correctly? Thanks!

As soon as you add a flash message or try to display a flash message, CakePHP will activate/start the session if it has not already been started.

You say that is not necessary to activate session? How about session component?

In AppController $this->loadComponent('Flash'); this is already written so you don’t have to write anything additional.

when i use : $this->Flash->success(__(’ ')); messeges appear in blue /cakephp 3 version
$this->session->setflash(_(" "))/this is in cakephp 2 messages appear in red
How do the messages appear in red using sessions and flash in cakephp 3?

Please follow the official doc and you will get every answer of your questions related to CakePHP. Btw red represents error or some problem so, here in CakePHP-3 you can use $this->Flash->error(__(' '));

Thanks man for your help!