wfClass = $m[1]; $this->wfName = array_search($m[1], \Civi\WorkflowMessage\WorkflowMessage::getWorkflowNameClassMap()); $this->exName = $m[2]; } /** * Get an example, merge/extend it with more data, and return the extended * variant. * * @param array $base * Baseline data to build upon. * @param array $overrides * Additional data to recursively add. * * @return array * The result of merging the original example with the $overrides. */ public function extend($base, $overrides = []) { \CRM_Utils_Array::extend($base, $overrides); return $base; } protected function toArray(\Civi\WorkflowMessage\WorkflowMessageInterface $wfMsg) { return [ 'workflow' => $this->wfName, 'modelProps' => $wfMsg->export('modelProps'), ]; } }