class RulesNodeConditionSticky
Condition: Check if the node is sticky.
Hierarchy
- class \RulesPluginHandlerBase extends \FacesExtender implements \RulesPluginHandlerInterface
- class \RulesConditionHandlerBase extends \RulesPluginHandlerBase implements \RulesConditionHandlerInterface
- class \RulesNodeConditionBase extends \RulesConditionHandlerBase
- class \RulesNodeConditionSticky extends \RulesNodeConditionBase
- class \RulesNodeConditionBase extends \RulesConditionHandlerBase
- class \RulesConditionHandlerBase extends \RulesPluginHandlerBase implements \RulesConditionHandlerInterface
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 |
---|---|---|---|
RulesNodeConditionBase::defaults | public static | function | |
RulesNodeConditionSticky::execute | public | function | Executes the condition. |
RulesNodeConditionSticky::getInfo | public static | function | Defines the condition. |