class RulesNodeConditionPromoted
Condition: Check if the node is promoted to the frontpage.
Hierarchy
- class \RulesPluginHandlerBase extends \FacesExtender implements \RulesPluginHandlerInterface
- class \RulesConditionHandlerBase extends \RulesPluginHandlerBase implements \RulesConditionHandlerInterface
- class \RulesNodeConditionBase extends \RulesConditionHandlerBase
- class \RulesNodeConditionPromoted extends \RulesNodeConditionBase
- class \RulesNodeConditionBase extends \RulesConditionHandlerBase
- class \RulesConditionHandlerBase extends \RulesPluginHandlerBase implements \RulesConditionHandlerInterface
Expanded class hierarchy of RulesNodeConditionPromoted
Related topics
File
-
modules/
node.eval.inc, line 120
View source
class RulesNodeConditionPromoted extends RulesNodeConditionBase {
/**
* Defines the condition.
*/
public static function getInfo() {
return self::defaults() + array(
'name' => 'node_is_promoted',
'label' => t('Content is promoted to frontpage'),
);
}
/**
* Executes the condition.
*/
public function execute($node) {
return $node->promote == 1;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
RulesNodeConditionBase::defaults | public static | function | |
RulesNodeConditionPromoted::execute | public | function | Executes the condition. |
RulesNodeConditionPromoted::getInfo | public static | function | Defines the condition. |