function rules_filter_array
Filters the given array of arrays.
This filter operates by keeping only entries which have $key set to the value of $value.
Parameters
array $array: The array of arrays to filter.
$key: The key used for the comparison.
$value: The value to compare the array's entry to.
Return value
array The filtered array.
6 calls to rules_filter_array()
- RulesAbstractPlugin::rebuildCache in includes/
rules.core.inc - Add in the data provided by the info hooks to the cache.
- RulesReactionRule::parameterInfo in includes/
rules.plugins.inc - rules_admin_components_overview in rules_admin/
rules_admin.inc - Components overview.
- rules_admin_component_options in rules_admin/
rules_admin.inc - rules_get_components in ./
rules.module - Returns an array of configured components.
File
-
./
rules.module, line 1167
Code
function rules_filter_array($array, $key, $value) {
$return = array();
foreach ($array as $i => $entry) {
$entry += array(
$key => NULL,
);
if ($entry[$key] == $value) {
$return[$i] = $entry;
}
}
return $return;
}