class RulesNodeConditionPublished in Rules 7.2
Condition: Check if the node is published.
Hierarchy
- class \RulesPluginHandlerBase extends \FacesExtender implements RulesPluginHandlerInterface
- class \RulesConditionHandlerBase implements RulesConditionHandlerInterface
- class \RulesNodeConditionBase
- class \RulesNodeConditionPublished
- class \RulesNodeConditionBase
- class \RulesConditionHandlerBase implements RulesConditionHandlerInterface
Expanded class hierarchy of RulesNodeConditionPublished
Related topics
File
- modules/
node.eval.inc, line 72 - Contains rules integration for the node module needed during evaluation.
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RulesNodeConditionBase:: |
public static | function | ||
RulesNodeConditionPublished:: |
public | function | Executes the condition. | |
RulesNodeConditionPublished:: |
public static | function | Defines the condition. | |
RulesPluginHandlerBase:: |
protected | property | ||
RulesPluginHandlerBase:: |
public | function |
Implements RulesPluginImplInterface::access(). Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function |
Returns an array of info assertions for the specified parameters. Overrides RulesPluginHandlerInterface:: |
1 |
RulesPluginHandlerBase:: |
public | function |
Returns an array of required modules. Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function |
Alters the generated configuration form of the element. Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function |
Allows altering of the element's action/condition info. Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function |
Processes settings independent from a form submission. Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function |
Validates $settings independent from a form submission. Overrides RulesPluginHandlerInterface:: |
|
RulesPluginHandlerBase:: |
public | function | Overridden to provide $this->element to make the code more meaningful. |