You are here

public static function RulesDataUIDuration::render in Rules 7.2

Implements RulesDataDirectInputFormInterface::render().

Overrides RulesDataUIText::render

File

ui/ui.data.inc, line 454
Contains data type related forms.

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',
      ),
    ),
  );
}