function RulesNodeConditionType::getInfo

Defines the condition.

File

modules/node.eval.inc, line 37

Class

RulesNodeConditionType
Condition: Check for selected content types.

Code

public static function getInfo() {
    $info = self::defaults() + array(
        'name' => 'node_is_of_type',
        'label' => t('Content is of type'),
        'help' => t('Evaluates to TRUE if the given content is of one of the selected content types.'),
    );
    $info['parameter']['type'] = array(
        'type' => 'list<text>',
        'label' => t('Content types'),
        'options list' => 'node_type_get_names',
        'description' => t('The content type(s) to check for.'),
        'restriction' => 'input',
    );
    return $info;
}