本文整理汇总了PHP中Assets::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::get方法的具体用法?PHP Assets::get怎么用?PHP Assets::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assets
的用法示例。
在下文中一共展示了Assets::get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$asset = Assets::get();
$this->addData(['css' => $asset->Css(), 'js' => $asset->Js(), 'internalCss' => $asset->InternalCss(), 'jsReady' => $asset->OnLoadJs()]);
$tpl = Template::get()->loadTemplate($this->template);
return $tpl->render($this->data);
}
示例2: __construct
public function __construct($model)
{
parent::__construct($model, self::TPL);
Assets::get()->addJs(['/js/parsley.js', '/js/parsley-i18n/it.js', '/js/bootstrap-timepicker.js', '/js/confirm-delete.js', '/js/sensor-settings.js']);
Assets::get()->addCss(['/css/sensor-settings.css']);
Assets::get()->addOnReadyJs('
$(function () {
$(\'[data-toggle="tooltip"]\').tooltip({trigger : "click", container : "body"});
})
');
}
示例3: __construct
public function __construct($model)
{
parent::__construct($model);
$asset = Assets::get();
$asset->addJs('/js/rainbow.js');
$asset->addJs('/js/statosistema.js');
$asset->addInternalCss('
.btn-group.pull-right {margin-top: -0.2em;}
.status { text-shadow: 1px 1px 1px black; }
.status.on { color: red; }
.status.off { color: lightseagreen; }
.status.undefined { color : red; }
');
}
示例4: __construct
public function __construct($model)
{
parent::__construct($model, self::TPL);
Assets::get()->addJs(['/js/highcharts.js', '/js/highcharts-i18n/it_IT.js']);
}
示例5: assets_body
/**
* Get the assets for <body> (shortly before </body>).
* @return array
*/
public function assets_body()
{
return $this->_assets->get('body');
}
示例6: assets_get
/**
* Retrieve URL of asset path
*
* @author Casper Rasmussen <cr@nodes.dk>
*
* @param $path
* @param \Nodes\Assets\Url\Settings|null $settings
* @return string $url
*/
function assets_get($path, \Nodes\Assets\Url\Settings $settings = null)
{
return \Assets::get($path, $settings);
}
示例7: __construct
public function __construct($model)
{
parent::__construct($model);
Assets::get()->addJs('/js/situazione.js');
}
示例8: __construct
public function __construct($model)
{
parent::__construct($model, self::TPL);
Assets::get()->addJs([]);
}
示例9: __construct
public function __construct($model)
{
parent::__construct($model, self::TPL);
Assets::get()->addJs(['/js/parsley.js', '/js/parsley-i18n/it.js', '/js/bootstrap-timepicker.js', '/js/confirm-delete.js', '/js/program-settings.js']);
Assets::get()->addCss(['/css/bootstrap-timepicker.css', '/css/program-settings.css']);
}