Prado\Web\UI\TControl::renderChildren PHP Метод

renderChildren() публичный Метод

This method iterates through all child controls and static text strings and renders them in order.
public renderChildren ( $writer )
    public function renderChildren($writer)
    {
        if ($this->getHasControls()) {
            foreach ($this->_rf[self::RF_CONTROLS] as $control) {
                if (is_string($control)) {
                    $writer->write($control);
                } else {
                    if ($control instanceof TControl) {
                        $control->renderControl($writer);
                    } else {
                        if ($control instanceof IRenderable) {
                            $control->render($writer);
                        }
                    }
                }
            }
        }
    }

Usage Example

Пример #1
0
 /**
  * Renders the body content enclosed between the control tag.
  * By default, child controls and text strings will be rendered.
  * You can override this method to provide customized content rendering.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderContents($writer)
 {
     parent::renderChildren($writer);
 }
TControl