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