本文整理匯總了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();
}