本文整理汇总了PHP中yii\bootstrap\Modal::run方法的典型用法代码示例。如果您正苦于以下问题:PHP Modal::run方法的具体用法?PHP Modal::run怎么用?PHP Modal::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Modal
的用法示例。
在下文中一共展示了Modal::run方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
Icon::map($this->view, Icon::FA);
echo "<div id='cjModalContent'>" . Icon::show('refresh fa-spin', [], Icon::FA) . "</div>";
// echo "".Icon::show('refresh fa-spin', [], Icon::FA)."";
parent::run();
}
示例2: getModal
public function getModal()
{
if (self::$_modal === null) {
ob_start();
ob_implicit_flush(false);
$this->optionsModal['class'] = Modal::className();
self::$_modal = Yii::createObject($this->optionsModal);
$out = self::$_modal->run();
$out = ob_get_clean() . $out;
$view = $this->getView();
$view->on($view::EVENT_END_BODY, function () use($out) {
echo $out;
});
}
return self::$_modal;
}
示例3: run
public function run()
{
$this->registerClientScript();
echo $this->renderContent();
echo $this->renderNoTemyMessage();
return parent::run();
}
示例4: run
/**
* @inheritdoc
*/
public function run()
{
parent::run();
if ($this->remote) {
$id = $this->options['id'];
$url = Url::to($this->remote);
$this->getView()->registerJs("Admin.Modal.remote('#{$id}', '{$url}');");
}
}
示例5: run
public function run()
{
switch (empty($this->content)) {
case false:
parent::init();
echo $this->content;
parent::run();
break;
default:
echo $this->renderTogglebutton() . Html::tag('div', Html::tag('div', Html::tag('div', $this->renderHeader() . $this->content, $this->contentOptions), $this->dialogOptions), $this->options);
break;
}
}
示例6: run
/**
* @inheritdocs
*/
public function run()
{
$view = $this->getView();
parent::run();
ModalAsset::register($view);
$id = $this->options['id'];
$ajaxSubmit = $this->ajaxSubmit ? 'true' : 'false';
$js = <<<JS
jQuery('#{$id}').kbModalAjax({
url: '{$this->url}',
ajaxSubmit: {$ajaxSubmit},
});
JS;
$view->registerJs($js);
}
示例7: run
public function run()
{
parent::run();
$js = <<<JS
\$(function(){
\$(".modal-button").click(function(){
console.log(\$(this));
var target = \$(this).attr('modal-target');
\$(target)
.modal("show")
.find(".modal-body")
.load( \$(this).closest("[modal-href]").attr("modal-href") );
});
});
JS;
$view = $this->getView();
$view->registerJs($js, View::POS_READY, 'yii2popup');
}
示例8: run
public function run()
{
$this->registerClientScript();
return parent::run();
}