id = $id; $this->name = $name; $this->description = $description; if (!isset($this->type)) { throw new Exception('Decision workflow step created without specifying a type.'); } } /** * Compile initial state data to pass to the frontend */ public function getState(): stdClass { $config = new stdClass(); $config->id = $this->id; $config->type = $this->type; $config->name = $this->name; $config->description = $this->description; $config->errors = new stdClass(); return $config; } }