You are here

function rules_action_entity_parameter_options_list in Rules 7.2

Options list callback for a parameter of entity_create.

Related topics

1 string reference to 'rules_action_entity_parameter_options_list'
rules_action_entity_create_info_alter in modules/entity.eval.inc
Info alteration callback for the entity create action.

File

modules/entity.rules.inc, line 210
General entity related rules integration.

Code

function rules_action_entity_parameter_options_list(RulesPlugin $element, $param_name) {

  // Remove the parameter name prefix 'param_'.
  $property_name = substr($param_name, 6);
  $wrapper = entity_metadata_wrapper($element->settings['type']);

  // The possible values of the "value" parameter are those of the data param.
  return $wrapper->{$property_name}
    ->optionsList();
}