murph-core/src/core/Event/Setting/SettingEvent.php

33 lines
596 B
PHP
Raw Normal View History

2022-03-13 19:32:32 +01:00
<?php
namespace App\Core\Event\Setting;
use Symfony\Contracts\EventDispatcher\Event;
/**
* class SettingEvent.
*
* @author Simon Vieille <simon@deblan.fr>
*/
class SettingEvent extends Event
{
2023-10-12 16:15:07 +02:00
public const INIT_EVENT = 'setting_event.init';
public const FORM_INIT_EVENT = 'setting_event.form_init';
2022-03-13 19:32:32 +01:00
public function __construct(protected $data = null)
2022-03-13 19:32:32 +01:00
{
}
public function getData()
{
return $this->data;
}
public function setOption(string $key, $value): self
{
$this->data['options'][$key] = $value;
return $this;
}
}