class RulesNodeConditionPublished

Condition: Check if the node is published.

Hierarchy

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.