本文整理汇总了PHP中Asset::less方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::less方法的具体用法?PHP Asset::less怎么用?PHP Asset::less使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::less方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: compile_less
/**
* compile less
*/
private static function compile_less()
{
$return_message = '';
$configs = \Config::get('less.less_source_files');
foreach ($configs as $config) {
\Asset::less($config, array(), null, false, true);
$return_message .= 'Compile ' . $config . PHP_EOL;
}
return $return_message;
}
示例2: action_index
public function action_index()
{
if (!Sentry::user()->has_access('users_index')) {
Session::set_flash('error', 'You DO NOT have access to the user list');
Response::redirect('');
}
$this->template->less = Asset::less(array('customic.less'));
$this->template->js .= Asset::js(array('mylibs/jquery.dataTables.js', 'mylibs/jquery-fallr-1.2.js'));
$this->template->css = Asset::css(array('sprite.tables.css'));
$data['users'] = Sentry::user()->all();
$this->template->js .= Asset::js(array('script.js'));
$this->template->h2 = 'List of users';
$this->template->title = 'User » Index';
$this->template->content = View::forge('users/index', $data);
}
示例3: before
public function before()
{
// check right accesses
if (!Sentry::user()->has_access('customers_index')) {
self::no_access();
}
// inherit parent
parent::before();
$this->languages = array();
if (Sentry::user()->has_access('customers_en')) {
array_push($this->languages, 'en');
}
if (Sentry::user()->has_access('customers_ru')) {
array_push($this->languages, 'ru');
}
if (Sentry::user()->has_access('customers_cn')) {
array_push($this->languages, 'cn');
}
if (Sentry::user()->has_access('customers_tw')) {
array_push($this->languages, 'tw');
}
View::set_global('language', $this->languages);
// assets
$this->template->js = Asset::js(array('mylibs/jquery.chosen.js', 'mylibs/jquery.ba-resize.js', 'mylibs/jquery.easing.1.3.js', 'mylibs/jquery.ui.touch-punch.js', '/mylibs/jquery.jgrowl.js', 'mylibs/jquery-fallr-1.2.js', 'script.js', 'mylibs/jquery.dataTables.1.9.4.min.js', 'mylibs/dataTables/jquery.jeditable.js', 'mylibs/dataTables/jquery.dataTables.editable.js', 'mylibs/dataTables/ColVis.js', 'mylibs/dataTables/ZeroClipboard.js', 'mylibs/dataTables/TableTools.min.js', 'mylibs/dataTables/FixedHeader.min.js', 'libs/date.js', 'datatables.configuration.js'));
$this->template->css = Asset::css(array('external/jquery-ui-1.8.16.custom.css', 'ColVis.css', 'TableTools.css', 'sprite.tables.css'));
$this->template->less = Asset::less(array('customic.less'));
// set the global to get the table url, name, clean name
// View::set_global('current_table',$this->current_table(Request::active()->action));
// $this->current_table = $this->current_table(Request::active()->action);
if (!empty(Request::active()->method_params)) {
View::set_global('current_table', $this->current_table(Request::active()->method_params[0]));
$this->current_table = $this->current_table(Request::active()->method_params[0]);
} else {
View::set_global('current_table', $this->current_table(Request::active()->action));
$this->current_table = $this->current_table(Request::active()->action);
}
$this->template->h2 = $this->current_table['cleanName'];
}
示例4: setup_assets
protected static function setup_assets()
{
if (!is_dev_env()) {
return;
}
if (IS_API) {
return;
}
$configs = \Config::get('less.less_source_files');
foreach ($configs as $config) {
//compile less
Asset::less($config);
}
}