class RulesListConditionsAll in Rules List Conditions 7
An all loop.
Hierarchy
- class \RulesExtendable extends \FacesExtendable
- class \RulesPlugin
- class \RulesContainerPlugin implements \IteratorAggregate
- class \RulesConditionContainer implements RulesConditionInterface
- class \RulesListConditionsConditionalLoop
- class \RulesListConditionsAll
- class \RulesListConditionsConditionalLoop
- class \RulesConditionContainer implements RulesConditionInterface
- class \RulesContainerPlugin implements \IteratorAggregate
- class \RulesPlugin
Expanded class hierarchy of RulesListConditionsAll
1 string reference to 'RulesListConditionsAll'
File
- includes/
rules_list_conditions.plugins.inc, line 80
View source
class RulesListConditionsAll extends RulesListConditionsConditionalLoop {
protected $itemName = 'all';
/**
* {@inheritdoc}
*/
public function __construct($settings = array(), $variables = NULL) {
parent::__construct($settings, $variables);
}
/**
* {@inheritdoc}
*/
public function evaluate(RulesState $state) {
try {
$param_info = $this
->pluginParameterInfo();
$list = $this
->getArgument('list', $param_info['list'], $state);
if (isset($this->settings['list:select'])) {
rules_log('Looping over the list items of %sel (ALL)', array(
'%sel' => $this->settings['list:select'],
), RulesLog::INFO, $this);
}
foreach ($list as $key => $item) {
$local = $this
->setListVar($state, $item);
foreach ($this->children as $condition) {
if (!$condition
->evaluate($local)) {
rules_log($this
->label() . ' evaluated to TRUE.');
return $this->negate;
}
}
}
rules_log($this
->label() . ' evaluated to FALSE.');
return !$this->negate;
} catch (RulesEvaluationException $e) {
$this
->logExn($e);
}
}
/**
* {@inheritdoc}
*/
protected function exportChildren($key = 'ALL') {
return parent::exportChildren($key);
}
/**
* {@inheritdoc}
*/
protected function importChildern($export, $key = 'ALL') {
parent::importChildren($export, $key);
}
/**
* {@inheritdoc}
*/
public function label() {
return !empty($this->label) ? $this->label : ($this->negate ? t('NOT ALL') : t('ALL'));
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RulesConditionContainer:: |
protected | property | ||
RulesConditionContainer:: |
public | function | Adds a condition to the container. | |
RulesConditionContainer:: |
public | function |
Returns whether the element is configured to negate the result. Overrides RulesConditionInterface:: |
|
RulesConditionContainer:: |
public | function |
Negate this condition. Overrides RulesConditionInterface:: |
|
RulesConditionContainer:: |
protected | function |
Just return the condition container's result. Overrides RulesPlugin:: |
|
RulesConditionContainer:: |
public | function |
Overrides RulesContainerPlugin:: |
|
RulesContainerPlugin:: |
protected | property | ||
RulesContainerPlugin:: |
public | function |
Whether the currently logged in user has access to all configured elements. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function |
Returns info about variables available to be used as arguments for this element. Overrides RulesPlugin:: |
|
RulesContainerPlugin:: |
public | function | Returns the specified variables, in case the plugin is used as component. | |
RulesContainerPlugin:: |
public | function |
Overrides delete to keep the children alive, if possible. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function |
Removes circular object references so PHP garbage collector can work. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function |
Executes container with the given arguments. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
protected | function | Determines whether the element should be exported in flat style. | 1 |
RulesContainerPlugin:: |
protected | function |
Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function | Allows access to the children through the iterator. | 1 |
RulesContainerPlugin:: |
public | function |
Applies the given export. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function |
Overrides optimize(). Overrides RulesPlugin:: |
|
RulesContainerPlugin:: |
public | function |
Returns info about parameters needed for executing the configured plugin. Overrides RulesPlugin:: |
|
RulesContainerPlugin:: |
public | function |
Resets any internal static caches. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
protected | function |
Returns info about all variables that have to be setup in the state. Overrides RulesPlugin:: |
|
RulesContainerPlugin:: |
public | function | Sorts all child elements by their weight. | 1 |
RulesContainerPlugin:: |
protected | function |
Returns asserted additions to the available variable info. Overrides RulesPlugin:: |
1 |
RulesContainerPlugin:: |
public | function |
By default we do a deep clone. Overrides RulesPlugin:: |
1 |
RulesExtendable:: |
protected | property | ||
RulesExtendable:: |
public | function | ||
RulesExtendable:: |
public | function | Forces the object to be setUp, this executes setUp() if not done yet. | 1 |
RulesExtendable:: |
public static | function | Returns whether the a RuleExtendable supports the given interface. | |
RulesExtendable:: |
public | function | Allows items to add something to the rules cache. | 1 |
RulesExtendable:: |
protected | function | 1 | |
RulesExtendable:: |
public | function | Magic method: Invoke the dynamically implemented methods. | |
RulesListConditionsAll:: |
protected | property |
The name of the item this class represents in the info hook. Overrides RulesExtendable:: |
|
RulesListConditionsAll:: |
public | function |
Evaluate the element on a given rules evaluation state. Overrides RulesPlugin:: |
|
RulesListConditionsAll:: |
protected | function |
Overrides RulesConditionContainer:: |
|
RulesListConditionsAll:: |
protected | function | ||
RulesListConditionsAll:: |
public | function |
Returns the label of the element. Overrides RulesPlugin:: |
|
RulesListConditionsAll:: |
public | function |
Overrides RulesListConditionsConditionalLoop:: |
|
RulesListConditionsConditionalLoop:: |
protected | property | ||
RulesListConditionsConditionalLoop:: |
public | function |
Calculates an array of required modules. Overrides RulesContainerPlugin:: |
|
RulesListConditionsConditionalLoop:: |
protected | function |
Overrides RulesPlugin:: |
|
RulesListConditionsConditionalLoop:: |
protected | function |
Overrides RulesConditionContainer:: |
|
RulesListConditionsConditionalLoop:: |
protected | function |
Overrides RulesPlugin:: |
|
RulesListConditionsConditionalLoop:: |
public | function |
Makes sure the plugin is configured right. Overrides RulesContainerPlugin:: |
|
RulesListConditionsConditionalLoop:: |
public | function | Return information about the list being iterated over. | |
RulesListConditionsConditionalLoop:: |
protected | function | Internal helper for child loops to log exceptions. | |
RulesListConditionsConditionalLoop:: |
public | function |
Returns info about parameters needed by the plugin. Overrides RulesPlugin:: |
|
RulesListConditionsConditionalLoop:: |
protected | function | Internal helper for child loops to set current item in loop body. | |
RulesListConditionsConditionalLoop:: |
protected | function |
Overridden to exclude variable assertions of negated conditions. Overrides RulesConditionContainer:: |
|
RulesPlugin:: |
protected | property | Static cache for availableVariables(). | 1 |
RulesPlugin:: |
protected | property |
Overrides RulesExtendable:: |
|
RulesPlugin:: |
protected | property | Identifies an element inside a configuration. | |
RulesPlugin:: |
protected | property |
Overrides RulesExtendable:: |
|
RulesPlugin:: |
public | property | If this is a configuration saved to the db, the id of it. | |
RulesPlugin:: |
protected | property | Info about this element. Usage depends on the plugin. | 2 |
RulesPlugin:: |
public | property | ||
RulesPlugin:: |
protected | property | The parent element, if any. | |
RulesPlugin:: |
public | property | An array of settings for this element. | |
RulesPlugin:: |
public | property | ||
RulesPlugin:: |
public | function | Applies the given data selector. | |
RulesPlugin:: |
protected | function | Checks whether parameters are correctly configured. | |
RulesPlugin:: |
protected | function | ||
RulesPlugin:: |
protected static | function | ||
RulesPlugin:: |
public | function | Returns the depth of this element in the configuration. | |
RulesPlugin:: |
public | function | Returns the element id, which identifies the element inside the config. | |
RulesPlugin:: |
public | function | Gets the element map helper object, which helps mapping elements to ids. | |
RulesPlugin:: |
public | function | Iterate over all elements nested below the current element. | |
RulesPlugin:: |
protected | function | Ensure the configuration has a name. If not, generate one. | |
RulesPlugin:: |
public | function | ||
RulesPlugin:: |
public | function | ||
RulesPlugin:: |
public | function | Execute the configuration. | |
RulesPlugin:: |
public | function | Exports a rule configuration. | |
RulesPlugin:: |
protected | function | ||
RulesPlugin:: |
public | function | Seamlessly invokes the method implemented via faces. | |
RulesPlugin:: |
public | function | ||
RulesPlugin:: |
public | function | ||
RulesPlugin:: |
protected | function | Returns the argument for the parameter $name described with $info. | |
RulesPlugin:: |
public | function | Returns info about the configured argument. | |
RulesPlugin:: |
protected | function | Gets the right arguments for executing the element. | |
RulesPlugin:: |
public | function | Gets the name of this plugin instance. | 1 |
RulesPlugin:: |
public | function | Checks if the configuration has a certain exportable status. | |
RulesPlugin:: |
public | function | Returns the config name. | |
RulesPlugin:: |
protected | function | ||
RulesPlugin:: |
public | function | Returns the info of the plugin. | 2 |
RulesPlugin:: |
public | function | ||
RulesPlugin:: |
public | function | Returns whether the element is the root of the configuration. | |
RulesPlugin:: |
public | function | Returns the element's parent. | |
RulesPlugin:: |
public | function | Returns the name of the element's plugin. | |
RulesPlugin:: |
public | function | Returns info about the element's plugin. | |
RulesPlugin:: |
public | function | Returns info about variables 'provided' by the plugin. | 2 |
RulesPlugin:: |
public | function | Processes the settings e.g. to prepare input evaluators. | 1 |
RulesPlugin:: |
public | function | Returns info about all variables provided for later evaluated elements. | 2 |
RulesPlugin:: |
protected | function | Finalizes the configuration export. | |
RulesPlugin:: |
public | function | Gets the root element of the configuration. | |
RulesPlugin:: |
public | function | Saves the configuration to the database. | 1 |
RulesPlugin:: |
public | function | Sets a new parent element. | |
RulesPlugin:: |
public | function | Sets up the execution state for the given arguments. | |
RulesPlugin:: |
public | function | When converted to a string, just use the export format. |