You are here

function rules_extract_property in Rules 7.2

Same name and namespace in other branches
  1. 6 rules/rules.module \rules_extract_property()

Extracts the property with the given name.

Parameters

array $arrays: An array of arrays from which a property is to be extracted.

$key: The name of the property to extract.

Return value

array An array of extracted properties, keyed as in $arrays.

2 calls to rules_extract_property()
rules_action_entity_query_property_options_list in modules/entity.rules.inc
Returns the options list for choosing a property of an entity type.
rules_admin_component_options in rules_admin/rules_admin.inc

File

./rules.module, line 1177
Rules engine module.

Code

function rules_extract_property($arrays, $key) {
  $data = array();
  foreach ($arrays as $name => $item) {
    $data[$name] = $item[$key];
  }
  return $data;
}