You are here

public function StylesDefault::render in Styles 6

Same name and namespace in other branches
  1. 6.2 includes/Styles.inc \StylesDefault::render()
  2. 7.2 includes/Styles.inc \StylesDefault::render()
1 call to StylesDefault::render()
StylesDefault::display in includes/Styles.inc

File

includes/Styles.inc, line 48
Styles.inc Base class for Styles.

Class

StylesDefault
@file Styles.inc Base class for Styles.

Code

public function render($reset = FALSE) {
  if ($reset) {
    $this
      ->set_output(NULL);
  }
  $output = $this
    ->get_output();
  if (!isset($output)) {

    // Get the array of callable class methods for this object.
    $methods = get_class_methods($this);
    foreach ($this
      ->get_effects() as $effect) {
      $effect_name = $effect['name'];
      if (in_array($effect_name, $methods)) {
        $this
          ->{$effect_name}($effect);
      }
      else {
        watchdog('styles', 'Effect %effect_name not found for %style_name display formatter style of the %class_name class.', array(
          '%effect_name' => $effect_name,
          '%style_name' => $this
            ->get_name(),
          '%class_name' => $this
            ->get_class_name(),
        ), WATCHDOG_WARNING);
      }
    }
  }
  return $this
    ->get_output();
}