public static function YamlFormElementHelper::getProperties in YAML Form 8
Get an associative array containing a render element's properties.
Parameters
array $element: A render element.
Return value
array An associative array containing a render element's properties.
3 calls to YamlFormElementHelper::getProperties()
- YamlForm::initElementsRecursive in src/
Entity/ YamlForm.php - Initialize form elements into a flatten array.
- YamlFormElementHelper::getFlattened in src/
Utility/ YamlFormElementHelper.php - Flatten a nested array of elements.
- YamlFormEntitySettingsForm::form in src/
YamlFormEntitySettingsForm.php - Gets the actual form array to be built.
File
- src/
Utility/ YamlFormElementHelper.php, line 70
Class
- YamlFormElementHelper
- Helper class form element methods.
Namespace
Drupal\yamlform\UtilityCode
public static function getProperties(array $element) {
$properties = [];
foreach ($element as $key => $value) {
if (Element::property($key)) {
$properties[$key] = $value;
}
}
return $properties;
}