You are here

function entityform_type_rules_list in Entityform 7

1 string reference to 'entityform_type_rules_list'
EntityformTypeUIController::hook_menu in ./entityform_type.admin.inc
Overrides hook_menu() defaults.

File

./entityform_type.admin.inc, line 70
Entityform type editing UI.

Code

function entityform_type_rules_list($rule_type) {

  //RulesPluginUI::$basePath = "admin/structure/entityform_types/{$rule_type}_rules";
  $options = array(
    'show plugin' => FALSE,
  );
  $content['enabled']['title']['#markup'] = '<h3>' . t("Enabled Entityform {$rule_type} Rules") . '</h3>';
  $conditions = array(
    'plugin' => array(
      'and',
      'or',
      'rule',
      'rule set',
    ),
    'active' => TRUE,
    'tags' => array(
      "entityform {$rule_type}",
    ),
  );
  $content['enabled']['rules'] = RulesPluginUI::overviewTable($conditions, $options);
  $content['enabled']['rules']['#empty'] = t("There are no active Entityform {$rule_type} rules.");
  $content['disabled']['title']['#markup'] = '<h3>' . t("Disabled Entityform {$rule_type} rules") . '</h3>';
  $conditions['active'] = FALSE;
  $content['disabled']['rules'] = RulesPluginUI::overviewTable($conditions, $options);
  $content['disabled']['rules']['#empty'] = t("There are no disabled Entityform {$rule_type} rules.");
  return $content;
}