function inline_conditions_get_info_by_module in Inline Conditions 7
Get inline conditions per module name.
Parameters
string $module: The module name.
Return value
array An array of inline conditions keyed by module name.
1 call to inline_conditions_get_info_by_module()
- inline_conditions_field_widget_form in ./
inline_conditions.field.inc - Implements hook_field_widget_form().
File
- ./
inline_conditions.module, line 518 - Extends Drupal 7 with a new field type to manage rules conditions directly from a field.
Code
function inline_conditions_get_info_by_module($module = NULL) {
$filtered_conditions = array();
foreach (inline_conditions_get_info() as $name => $condition) {
$filtered_conditions[$condition['module']][$name] = $condition;
}
// Apply module filter if it's set.
if (!empty($module)) {
$filtered_conditions = !empty($filtered_conditions[$module]) ? array(
$module => $filtered_conditions[$module],
) : array();
}
return $filtered_conditions;
}