You are here

class RulesDataUIOrganigrams in Organigrams 7

UI for taxonomy vocabularies.

Hierarchy

Expanded class hierarchy of RulesDataUIOrganigrams

See also

RulesOrganigramsWrapper

1 string reference to 'RulesDataUIOrganigrams'
organigrams_rules_data_info_alter in ./organigrams.rules.inc
Implements hook_rules_data_info_alter().

File

./organigrams.rules.inc, line 224
Rules integration for the organigrams module.

View source
class RulesDataUIOrganigrams extends RulesDataUIEntity implements RulesDataInputOptionsListInterface {

  /**
   * Set a default mode.
   *
   * @return string
   *   Default mode is 'input'.
   */
  public static function getDefaultMode() {
    return 'input';
  }

  /**
   * Implements RulesDataInputOptionsListInterface::optionsList().
   *
   * @param \RulesPlugin $element
   *   Contains a rules plugin.
   * @param string $name
   *   Contains an Organigrams name.
   *
   * @return array
   *   Array containing organigram names.
   */
  public static function optionsList(RulesPlugin $element, $name) {
    $options = array();
    foreach (organigrams_get_names() as $machine_name => $organigram) {
      $options[$machine_name] = $organigram->name;
    }
    return $options;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RulesDataUI::getTypeInfo public static function Returns the data type and parameter information for the given arguments.
RulesDataUI::renderOptionsLabel public static function Renders the value with a label if an options list is available.
RulesDataUI::selectionForm public static function Provides the selection form for a parameter.
RulesDataUIEntity::inputForm public static function Implements RulesDataDirectInputFormInterface::inputForm(). Overrides RulesDataUIText::inputForm
RulesDataUIOrganigrams::getDefaultMode public static function Set a default mode. Overrides RulesDataUIEntity::getDefaultMode
RulesDataUIOrganigrams::optionsList public static function Implements RulesDataInputOptionsListInterface::optionsList(). Overrides RulesDataInputOptionsListInterface::optionsList
RulesDataUIText::render public static function Implements RulesDataDirectInputFormInterface::render(). Overrides RulesDataDirectInputFormInterface::render 4