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