end() public static method

Note that the rendering result of the widget is directly echoed out.
See also: begin()
public static end ( ) : static
return static the widget instance that is ended.
Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public static function end()
 {
     /** @var Widget $widget */
     $widget = parent::end();
     if ($widget->renderJs) {
         echo $widget->renderJs();
     }
 }
Ejemplo n.º 2
0
 /**
  * Get script from output buffer, and register by \yii\web\View::registerJs()
  * @see \yii\base\Widget::end()
  */
 public static function end()
 {
     $script = ob_get_clean();
     $widget = parent::end();
     if (preg_match("/^\\s*\\<script\\>(.*)\\<\\/script\\>\\s*\$/s", $script, $matches)) {
         $script = $matches[1];
     }
     $widget->view->registerJs($script, $widget->position, $widget->key);
 }
 public static function end()
 {
     echo Html::endTag('div');
     Html::addCssClass(static::$buttonContainerOptions, 'nb__button_container');
     echo Html::beginTag('div', static::$buttonContainerOptions);
     echo Html::beginTag('div', static::$buttonBlockOptions);
     echo Html::beginTag('div', static::$buttonWrapOptions);
     $widget = parent::end();
     echo Html::endTag('div');
     echo Html::endTag('div');
     echo Html::endTag('div');
     echo Html::endTag('div');
     return $widget;
 }
Ejemplo n.º 4
0
 public static function end()
 {
     echo '</main>';
     return parent::end();
 }
Ejemplo n.º 5
0
 public static function end()
 {
     parent::end();
 }
Ejemplo n.º 6
0
 public static function end()
 {
     $w = self::$stack[count(self::$stack) - 1];
     $view = $w->getView();
     if ($c = count($w->structurePath) > 0) {
         throw new \yii\base\Exception(sprintf("%d unclosed relations", $c));
     }
     echo Html::endForm();
     $w->createMappings();
     // if we don't have any data, initialize empty attributes, otherwise attributes are not created by mapping
     if (empty($w->data)) {
         foreach ($w->structure as $key => $value) {
             foreach ($value as $key2 => $value2) {
                 $w->data[$key2] = null;
             }
         }
     }
     if ($w->bind) {
         $w->bind($w->data, $w->errors);
     }
     parent::end();
 }