本文整理汇总了PHP中Asset::loaded方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::loaded方法的具体用法?PHP Asset::loaded怎么用?PHP Asset::loaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::loaded方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loaded
protected function loaded($reloaded = false)
{
parent::loaded($reloaded);
$this->associateParents('show');
$model = self::$models[get_class($this)];
if (!isset($this->instanceClass) || !isset($this->property)) {
$rs = $model->query(array('kind' => 'series', 'parent' => $this->uuid));
if ($rs->next()) {
$ic = 'http://purl.org/ontology/po/Brand';
$pr = 'http://purl.org/ontology/po/brand';
} else {
$ic = 'http://purl.org/ontology/po/Series';
$pr = 'http://purl.org/ontology/po/series';
}
if (!isset($this->instanceClass)) {
$this->instanceClass = $ic;
}
if (!isset($this->property)) {
$this->property = $pr;
}
}
}
示例2: get_defined_constants
$constant = get_defined_constants(true);
$constant_js = "";
foreach ($constant['user'] as $k => $v) {
$constant_js .= $k . '=' . json_encode($v) . ',';
}
unset($constant);
$cargo = array('segment' => $segment, 'language' => $config->language, 'languages' => Config::get('DASHBOARD.languages', array()), 'html_parser' => Config::get('html_parser'), 'file_extension_allow' => implode(',', File::$config['file_extension_allow']), 'url' => array('protocol' => $config->url_protocol, 'base' => $config->url_base, 'host' => $config->url_host, 'url' => $config->url_url, 'path' => $config->url_path, 'current' => $config->url_current, 'query' => $config->url_query));
$output = O_BEGIN . '<script>var ' . rtrim($constant_js, ',') . ';';
foreach ($cargo as $k => $v) {
$output .= 'DASHBOARD.' . $k . '=' . json_encode($v) . ';';
}
$output .= 'DASHBOARD.url.hash=window.location.hash;';
echo $output . '</script>' . O_END;
}, 20);
Weapon::add('shell_after', function () use($config) {
if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) {
echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH);
}
$path = __DIR__ . DS . 'assets' . DS . 'shell' . DS;
echo Asset::stylesheet(array($path . 'row.css', $path . 'upload.css', $path . 'tab.css', $path . 'toggle.css', $path . 'modal.css', $path . 'tooltip.css', $path . 'sortable.css', $path . 'accordion.css', $path . 'layout.css', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'shell' . DS . 'manager.css'), "", 'shell/manager.min.css');
}, 10);
Weapon::add('cargo_after', function () use($config, $speak) {
if (Config::get('widget_manager_bar_id', 0) <= 1) {
echo Widget::manager('BAR');
// include once ...
}
}, 20);
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config) {
Session::kill('recent_item_update');
$path = __DIR__ . DS . 'assets' . DS . 'sword' . DS;
echo Asset::javascript(array($path . 'ajax.js', $path . 'row.js', $path . 'slug.js', $path . 'upload.js', $path . 'tab.js', $path . 'toggle.js', $path . 'modal.js', $path . 'tooltip.js', $path . 'sortable.js', $path . 'accordion.js', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'sword' . DS . 'manager.js'), "", 'sword/manager.min.js');
示例3: loaded
protected function loaded($reloaded = false)
{
parent::loaded($reloaded);
$this->associateParents('episode');
}
示例4: do_response_reply_x
function do_response_reply_x($post)
{
global $config, $speak, $parent;
$s = Asset::loaded($config->protocol . ICON_LIBRARY_PATH) ? '<i class="fa fa-times-circle"></i> ' : "";
echo ' <a href="' . $post->url . '" class="btn btn-reject btn-reject-reply"' . ($parent === false ? ' style="display:none;"' : "") . '>' . $s . $speak->cancel . '</a>';
}
示例5: loaded
protected function loaded($reloaded = false)
{
parent::loaded($reloaded);
$this->associateParents('series', 'show');
}