'', 'title' => 'required', 'allDay' => '', 'start' => 'required', 'end' => '', 'url' => '', 'className' => '', 'editable' => 'boolean', 'startEditable' => 'boolean', 'durationEditable' => 'boolean', 'rendering' => '', 'overlap' => 'boolean', 'constraint' => '', 'source' => '', 'color' => '', 'backgroundColor' => '', 'borderColor' => '', 'textColor' => '', ]; /** * Event constructor. * @param $args */ public function __construct($args) { foreach ($args as $key => $value) { $this->$key = $value; // if we have start and end date keys we need to convert them if (in_array($key, ['start', 'end'])) { $this->$key = !is_null($value) ? $value->toIso8601String() : null; } } } }