apiRequest; } /** * @param \Civi\Api4\Generic\AbstractAction|array $apiRequest * The full description of the API request. * @return static */ protected function setApiRequest($apiRequest) { $this->apiRequest = $apiRequest; return $this; } /** * Create a brief string identifying the entity/action. Useful for * pithy matching/switching. * * Ex: if ($e->getApiRequestSig() === '3.contact.get') { ... } * * @return string * Ex: '3.contact.get' */ public function getApiRequestSig(): string { return mb_strtolower($this->apiRequest['version'] . '.' . $this->apiRequest['entity'] . '.' . $this->apiRequest['action']); } /** * @return string * Ex: 'Contact', 'Activity' */ public function getEntityName(): string { return $this->apiRequest['entity']; } /** * @return string * Ex: 'create', 'update' */ public function getActionName(): string { return $this->apiRequest['action']; } }