final function run ($onlyContent = false)
  {
    if (!$this->context)
      throw new ComponentException($this, self::ERR_NO_CONTEXT);

    if ($this->isVisible ()) {
      $this->preRun ();
      //---- Rendering code ----
      $this->preRender ();
      if ($onlyContent)
        $this->runChildren ();
      else $this->render ();
      $this->postRender ();
      //---- /Rendering code ----
      $this->afterRender ();
    }
  }
final function run ($onlyContent = false)
  {
    if (!$this->context)
      throw new ComponentException($this, self::ERR_NO_CONTEXT);

    if ($this->isVisible ()) {
      $this->preRun ();
      //---- Rendering code ----
      $this->preRender ();
      if ($onlyContent)
        $this->runChildren ();
      else $this->render ();
      $this->postRender ();
      //---- /Rendering code ----
      $this->afterRender ();
    }
  }
final function run ( $ onlyContent = false ) { if ( ! $ this -> context ) throw new ComponentException ( $ this , self :: ERR_NO_CONTEXT ) ; if ( $ this -> isVisible ( ) ) { $ this -> preRun ( ) ; //---- Rendering code ---- $ this -> preRender ( ) ; if ( $ onlyContent ) $ this -> runChildren ( ) ; else $ this -> render ( ) ; $ this -> postRender ( ) ; //---- /Rendering code ---- $ this -> afterRender ( ) ; } }
Renders the component.

<p>This performs all the setup and data binding logic required for a successful render.
It is the correct method that should be called for rendering, **not** {@see render}, as the later is meant for
subclasses to provide the actual rendering process.

<p>**You can't override this!** But there are many extension points meant for overriding specific parts of the
rendering process. See the documentation to find out which suits your needs.

@param bool $onlyContent If true, {@see render} will not be called and only children will be rendered.
@throws ComponentException
Renders the component .