function rules_action_entity_query_value_options_list in Rules 7.2
Returns the options list specified for the chosen property.
Related topics
1 string reference to 'rules_action_entity_query_value_options_list'
- rules_action_entity_query_info_alter in modules/
entity.eval.inc - Info alteration callback for the entity query action.
File
- modules/
entity.rules.inc, line 243 - General entity related rules integration.
Code
function rules_action_entity_query_value_options_list(RulesAbstractPlugin $element) {
// Get the possible values for the selected property.
$element->settings += array(
'type' => NULL,
'property' => NULL,
);
if ($element->settings['type'] && $element->settings['property']) {
$wrapper = rules_get_entity_metadata_wrapper_all_properties($element);
if (isset($wrapper->{$element->settings['property']}) && ($property = $wrapper->{$element->settings['property']})) {
return $property
->optionsList('view');
}
}
}