You are here

function uc_termsofservice_ca_predicate in Ubercart Terms of Service 6

Same name and namespace in other branches
  1. 7 uc_termsofservice.rules.inc \uc_termsofservice_ca_predicate()

Implements hook_ca_predicate().

File

./uc_termsofservice.ca.inc, line 11
Conditional Actions hooks and functions for the terms of service panes.

Code

function uc_termsofservice_ca_predicate() {
  $predicates['uc_termsofservice_display_pane'] = array(
    '#title' => t('Display pane depending on the product classes'),
    '#class' => 'uc_termsofservice',
    '#trigger' => 'uc_termsofservice_display_pane',
    '#status' => 1,
    '#conditions' => array(
      '#operator' => 'AND',
      '#conditions' => array(
        array(
          '#name' => 'uc_termsofservice_condition_product_class',
          '#title' => t('Check if there are products of the selected product classes.'),
          '#argument_map' => array(
            'cart' => 'cart',
          ),
          '#settings' => array(
            'negate' => FALSE,
            'class' => array(
              'product',
            ),
          ),
        ),
      ),
    ),
    '#actions' => array(),
  );
  return $predicates;
}