本文整理汇总了PHP中yii\base\Widget::end方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::end方法的具体用法?PHP Widget::end怎么用?PHP Widget::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\base\Widget
的用法示例。
在下文中一共展示了Widget::end方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: end
/**
* @inheritdoc
*/
public static function end()
{
/** @var Widget $widget */
$widget = parent::end();
if ($widget->renderJs) {
echo $widget->renderJs();
}
}
示例2: end
/**
* 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);
}
示例3: end
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;
}
示例4: end
public static function end()
{
echo '</main>';
return parent::end();
}
示例5: end
public static function end()
{
parent::end();
}
示例6: end
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();
}