Projet

Général

Profil

Révision 950416da

Ajouté par Assos Assos il y a plus de 5 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/rules/modules/php.rules.inc
1 1
<?php
2 2

  
3 3
/**
4
 * @file rules integration for the php module
4
 * @file
5
 * Rules integration for the php module.
5 6
 *
6 7
 * @addtogroup rules
8
 *
7 9
 * @{
8 10
 */
9 11

  
......
35 37
  return array(
36 38
    'php' => array(
37 39
      'class' => 'RulesPHPDataProcessor',
38
      'type' => array('text', 'token',  'decimal', 'integer', 'date', 'duration', 'boolean', 'uri'),
40
      'type' => array('text', 'token', 'decimal', 'integer', 'date', 'duration', 'boolean', 'uri'),
39 41
      'weight' => 10,
40 42
      'module' => 'php',
41 43
    ),
......
124 126
  $render['top'] = array(
125 127
    '#prefix' => '<p>',
126 128
    '#suffix' => '</p>',
127
    '#markup' => t('PHP code inside of &lt;?php ?&gt; delimiters will be evaluated and replaced by its output. E.g. &lt;? echo 1+1?&gt; will be replaced by 2.')
128
                 . ' ' . t('Furthermore you can make use of the following variables:'),
129
    '#markup' => t('PHP code inside of &lt;?php ?&gt; delimiters will be evaluated and replaced by its output. E.g. &lt;? echo 1+1?&gt; will be replaced by 2.') . ' ' . t('Furthermore you can make use of the following variables:'),
129 130
  );
130 131
  $render['vars'] = array(
131 132
    '#theme' => 'table',
......
136 137
  $cache = rules_get_cache();
137 138
  foreach ($var_info as $name => $info) {
138 139
    $row   = array();
139
    $row[] = '$'. check_plain($name);
140
    $row[] = '$' . check_plain($name);
140 141
    $label = isset($cache['data_info'][$info['type']]['label']) ? $cache['data_info'][$info['type']]['label'] : $info['type'];
141 142
    $row[] = check_plain(drupal_ucfirst($label));
142 143
    $row[] = check_plain($info['label']);
......
155 156

  
156 157
/**
157 158
 * @}
158
 */
159
 */

Formats disponibles : Unified diff