You are here

function inline_conditions_options_list in Inline Conditions 7

Returns an options list of inline conditions per type.

Parameters

array $condition_info: An array of inline conditions.

Return value

array An array of inline conditions keyed by condition machine name.

1 call to inline_conditions_options_list()
inline_conditions_field_widget_form in ./inline_conditions.field.inc
Implements hook_field_widget_form().

File

./inline_conditions.module, line 542
Extends Drupal 7 with a new field type to manage rules conditions directly from a field.

Code

function inline_conditions_options_list($condition_info) {

  // Complete an array ready to be used as value for a select form element.
  $condition_list = array(
    '' => t('- All -'),
  );
  foreach ($condition_info as $condition_name => $info) {
    $condition_list[$condition_name] = $info['label'];
  }
  return $condition_list;
}