You are here

public function Utils::wf_crm_explode_key in Webform CiviCRM Integration 8.5

Explodes form key into an array and verifies that it is in the right format

Parameters

$key: Webform component field key (string)

Return value

array or NULL

Overrides UtilsInterface::wf_crm_explode_key

1 call to Utils::wf_crm_explode_key()
Utils::wf_crm_get_field in src/Utils.php
Get a field based on its short or full name

File

src/Utils.php, line 23
Webform CiviCRM module's common utility functions.

Class

Utils

Namespace

Drupal\webform_civicrm

Code

public function wf_crm_explode_key($key) {
  $pieces = explode('_', $key, 6);
  if (count($pieces) !== 6 || $pieces[0] !== 'civicrm') {
    return NULL;
  }
  return $pieces;
}