private function BusinessRulesUtil::getMappingsArray in Business Rules 8
Same name and namespace in other branches
- 2.x src/Util/BusinessRulesUtil.php \Drupal\business_rules\Util\BusinessRulesUtil::getMappingsArray()
Helper function to return the fields schema.
Parameters
array $schema: The schema array.
Return value
array The items that belongs to array mapping key.
1 call to BusinessRulesUtil::getMappingsArray()
- BusinessRulesUtil::getFieldsSchema in src/
Util/ BusinessRulesUtil.php - Return a the mapping fields for a given entity config schema.
File
- src/
Util/ BusinessRulesUtil.php, line 1163
Class
- BusinessRulesUtil
- Class BusinessRulesUtil.
Namespace
Drupal\business_rules\UtilCode
private function getMappingsArray(array $schema) {
$result = [];
foreach ($schema as $key => $value) {
if ($key == 'mapping') {
foreach ($value as $mk => $mv) {
$result[] = $mk;
if (isset($value['mapping'])) {
$result += $this
->getMappingsArray($mv);
}
// Elseif (is_array($))
}
}
}
return $result;
}