本文整理汇总了PHP中AssetsHelper::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP AssetsHelper::getInstance方法的具体用法?PHP AssetsHelper::getInstance怎么用?PHP AssetsHelper::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetsHelper
的用法示例。
在下文中一共展示了AssetsHelper::getInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($modx, $tv)
{
$this->modx = $modx;
$this->tv = $tv;
$this->DLTemplate = \DLTemplate::getInstance($modx);
$this->fs = \Helpers\FS::getInstance();
$this->assets = \AssetsHelper::getInstance($modx);
}
示例2: __construct
/**
* @param $modx
* @param string $lang_attribute
* @param bool $debug
*/
public function __construct($modx, $lang_attribute = 'en', $debug = false)
{
$this->modx = $modx;
$this->_table = $modx->getFullTableName($this->table);
$this->lang_attribute = $lang_attribute;
$this->params = $modx->event->params;
if ($this->checkTemplate && !isset($this->params['template']) && $modx->event->name != 'OnEmptyTrash') {
$this->params['template'] = array_pop($modx->getDocument($this->params['id'], 'template', 'all', 'all'));
}
//overload plugin and class properties
$_params = $modx->parseProperties('&template=;;' . $this->params['template'] . ' &id=;;' . $this->params['id'], $modx->event->activePlugin, 'plugin');
foreach ($_params as $key => $value) {
if (property_exists($this, $key)) {
$this->{$key} = $value;
}
}
$this->params = array_merge($this->params, $_params);
$modx->event->_output = "";
$this->DLTemplate = \DLTemplate::getInstance($this->modx);
$this->fs = \Helpers\FS::getInstance();
$this->assets = \AssetsHelper::getInstance($modx);
}