function RulesDataUIDuration::render

Implements RulesDataDirectInputFormInterface::render().

Overrides RulesDataUIText::render

File

ui/ui.data.inc, line 454

Class

RulesDataUIDuration
UI for duration type parameter.

Code

public static function render($value) {
    $value = is_numeric($value) ? format_interval($value) : check_plain($value);
    return array(
        'content' => array(
            '#markup' => $value,
        ),
        '#attributes' => array(
            'class' => array(
                'rules-parameter-duration',
            ),
        ),
    );
}