Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/rules/modules/data.eval.inc | ||
---|---|---|
294 | 294 |
$element_info['parameter']['param_' . $property] = array_intersect_key($property_info, array_flip(array('type', 'label', 'allow null'))); |
295 | 295 |
if (empty($property_info['required'])) { |
296 | 296 |
$element_info['parameter']['param_' . $property]['optional'] = TRUE; |
297 |
$element_info['parameter']['param_' . $property]['allow null'] = TRUE; |
|
297 | 298 |
} |
298 | 299 |
} |
299 | 300 |
} |
... | ... | |
366 | 367 |
return in_array($item, $list); |
367 | 368 |
} |
368 | 369 |
|
370 |
/** |
|
371 |
* Condition: List count comparison. |
|
372 |
*/ |
|
373 |
function rules_condition_data_list_count_is($list, $op = '==', $value) { |
|
374 |
switch ($op) { |
|
375 |
case '==': |
|
376 |
return count($list) == $value; |
|
377 |
case '<'; |
|
378 |
return count($list) < $value; |
|
379 |
case '>'; |
|
380 |
return count($list) > $value; |
|
381 |
} |
|
382 |
} |
|
383 |
|
|
369 | 384 |
/** |
370 | 385 |
* Condition: Data value is empty. |
371 | 386 |
*/ |
Formats disponibles : Unified diff
Weekly update of contrib modules