How to give Flash message a custom css class in cake 3
<p>I want to give a Flash message a custom css class in Cakephp 3, there is my function in my (edit in this case) controller:</p>

<pre><code>public function edit($id = null)
{
    $this-&gt;viewBuilder()-&gt;layout('personalizado');
    $user = $this-&gt;Users-&gt;get($id, [
        'contain' =&gt; []
    ]);
    if ($this-&gt;request-&gt;is(['patch', 'post', 'put'])) {
        $user = $this-&gt;Users-&gt;patchEntity($user, $this-&gt;request-&gt;data);
        if ($this-&gt;Users-&gt;save($user)) {
            $this-&gt;Flash-&gt;success('Utilizador editado com sucesso.', 'default', ['class' =&gt; 'alert alert-success']);
            return $this-&gt;redirect(['action' =&gt; 'index']);
        } else {
            $this-&gt;Flash-&gt;error(__('Erro ao apagar utilizador, por favor tente de novo.'));
        }
    }
    $this-&gt;set(compact('user'));
    $this-&gt;set('_serialize', ['user']);
}
</code></pre>

<p>I added the custom css claas in this line:</p>

<pre><code>$this-&gt;Flash-&gt;success('Utilizador editado com sucesso.', 'default', ['class' =&gt; 'alert alert-success']);
</code></pre>

<p>but is not working, thanks in advance.</p>