class RulesNodeConditionSticky
Condition: Check if the node is sticky.
Hierarchy
- class \RulesPluginHandlerBase extends \RulesPluginHandlerInterface implements \FacesExtender
- class \RulesConditionHandlerBase extends \RulesConditionHandlerInterface implements \RulesPluginHandlerBase
- class \RulesNodeConditionBase implements \RulesConditionHandlerBase
- class \RulesNodeConditionSticky implements \RulesNodeConditionBase
- class \RulesNodeConditionBase implements \RulesConditionHandlerBase
- class \RulesConditionHandlerBase extends \RulesConditionHandlerInterface implements \RulesPluginHandlerBase
Expanded class hierarchy of RulesNodeConditionSticky
Related topics
File
-
modules/
node.eval.inc, line 96
View source
class RulesNodeConditionSticky extends RulesNodeConditionBase {
/**
* Defines the condition.
*/
public static function getInfo() {
return self::defaults() + array(
'name' => 'node_is_sticky',
'label' => t('Content is sticky'),
);
}
/**
* Executes the condition.
*/
public function execute($node) {
return $node->sticky == 1;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
RulesNodeConditionBase::defaults | public static | function | |||
RulesNodeConditionSticky::execute | public | function | Executes the condition. | ||
RulesNodeConditionSticky::getInfo | public static | function | Defines the condition. | ||
RulesPluginHandlerBase::$element | protected | property | |||
RulesPluginHandlerBase::access | public | function | Implements RulesPluginImplInterface::access(). | Overrides RulesPluginHandlerInterface::access | |
RulesPluginHandlerBase::assertions | public | function | Returns an array of info assertions for the specified parameters. | Overrides RulesPluginHandlerInterface::assertions | 1 |
RulesPluginHandlerBase::dependencies | public | function | Returns an array of required modules. | Overrides RulesPluginHandlerInterface::dependencies | |
RulesPluginHandlerBase::form_alter | public | function | Alters the generated configuration form of the element. | Overrides RulesPluginHandlerInterface::form_alter | |
RulesPluginHandlerBase::info_alter | public | function | Allows altering of the element's action/condition info. | Overrides RulesPluginHandlerInterface::info_alter | |
RulesPluginHandlerBase::process | public | function | Processes settings independent from a form submission. | Overrides RulesPluginHandlerInterface::process | |
RulesPluginHandlerBase::validate | public | function | Validates $settings independent from a form submission. | Overrides RulesPluginHandlerInterface::validate | |
RulesPluginHandlerBase::__construct | public | function | Overridden to provide $this->element to make the code more meaningful. |