class RulesDataUIListEntity
UI for lists of entity-based data types.
Hierarchy
- class \RulesDataUI
- class \RulesDataUIText extends \RulesDataUI implements \RulesDataDirectInputFormInterface
- class \RulesDataUIListText extends \RulesDataUIText
- class \RulesDataUIListInteger extends \RulesDataUIListText
- class \RulesDataUIListEntity extends \RulesDataUIListInteger
- class \RulesDataUIListInteger extends \RulesDataUIListText
- class \RulesDataUIListText extends \RulesDataUIText
- class \RulesDataUIText extends \RulesDataUI implements \RulesDataDirectInputFormInterface
Expanded class hierarchy of RulesDataUIListEntity
1 string reference to 'RulesDataUIListEntity'
- rules_rules_core_data_info_alter in modules/
rules_core.rules.inc - Implements hook_rules_data_info_alter() on behalf of the pseudo rules_core module.
File
-
ui/
ui.data.inc, line 682
View source
class RulesDataUIListEntity extends RulesDataUIListInteger {
/**
* Implements RulesDataDirectInputFormInterface::inputForm().
*/
public static function inputForm($name, $info, $settings, RulesPlugin $element) {
$form = parent::inputForm($name, $info, $settings, $element);
if (empty($info['options list'])) {
$entity_info = entity_get_info(entity_property_list_extract_type($info['type']));
if (!empty($entity_info['entity keys']['name'])) {
$form[$name]['#element_validate'] = array(
'rules_ui_element_token_list_validate',
);
}
$form[$name]['#title'] = t('@entity identifiers', array(
'@entity' => $entity_info['label'],
));
$entity_label = strtolower($entity_info['label'][0]) . substr($entity_info['label'], 1);
$form[$name]['#description'] = t('Specify a comma-separated list of identifiers of @entity entities.', array(
'@entity' => $entity_label,
));
}
return $form;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
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. | |
RulesDataUIListEntity::inputForm | public static | function | Implements RulesDataDirectInputFormInterface::inputForm(). | Overrides RulesDataUIListInteger::inputForm |
RulesDataUIListText::getDefaultMode | public static | function | Overrides RulesDataUI::getDefaultMode(). | Overrides RulesDataUIText::getDefaultMode |
RulesDataUIListText::render | public static | function | Implements RulesDataDirectInputFormInterface::render(). | Overrides RulesDataUIText::render |