You are here

public static function FlagRulesUIClass::render in Flag 7.2

Same name and namespace in other branches
  1. 7.3 flag.rules.inc \FlagRulesUIClass::render()

Render the configured value.

Return value

array A renderable array.

Overrides RulesDataDirectInputFormInterface::render

File

./flag.rules.inc, line 84
Rules integration for the Flag module.

Class

FlagRulesUIClass
UI for inputing flags.

Code

public static function render($value) {
  $flag = flag_get_flag($value);
  if ($flag === FALSE) {
    return array();
  }
  return array(
    'content' => array(
      '#markup' => check_plain($flag
        ->get_title()),
    ),
    '#attributes' => array(
      'class' => array(
        'rules-parameter-flag',
      ),
    ),
  );
}