You are here

function rules_php_condition_info in Rules 7.2

Implements hook_rules_condition_info() on behalf of the PHP module.

Related topics

File

modules/php.rules.inc, line 103
Rules integration for the php module.

Code

function rules_php_condition_info() {
  return array(
    'php_eval' => array(
      'label' => t('Execute custom PHP code'),
      'group' => t('PHP'),
      'parameter' => array(
        'code' => array(
          'restriction' => 'input',
          'type' => 'text',
          'label' => t('PHP code'),
          'description' => t('Enter PHP code without &lt;?php ?&gt; delimiters that returns a boolean value; e.g. <code>@code</code>.', array(
            '@code' => "return arg(0) == 'node';",
          )),
        ),
      ),
      'base' => 'rules_execute_php_eval',
      'access callback' => 'rules_php_integration_access',
    ),
  );
}