public static function YamlFormArrayHelper::inArray in YAML Form 8
Determine if any values are in an array.
Parameters
array $needles: The searched values.
array $haystack: The array.
Return value
bool TRUE if any values are in an array.
See also
http://stackoverflow.com/questions/7542694/in-array-multiple-values
1 call to YamlFormArrayHelper::inArray()
- yamlform_process_states in ./
yamlform.module - Adds JavaScript to change the state of an element based on another element.
File
- src/
Utility/ YamlFormArrayHelper.php, line 71
Class
- YamlFormArrayHelper
- Provides helper to operate on arrays.
Namespace
Drupal\yamlform\UtilityCode
public static function inArray(array $needles, array $haystack) {
return !!array_intersect($needles, $haystack);
}