本文整理汇总了PHP中Asset::style方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::style方法的具体用法?PHP Asset::style怎么用?PHP Asset::style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::style方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_checkout
/**
* Checkout item
* @return Response
*/
public function get_checkout($id = null)
{
if (!Auth::can('add_checkout')) {
Vsession::cadd('y', __('site.not_allowed'))->cflash('status');
return Redirect::to_action('item@list');
}
// Generating buttons
$this->item_buttons = Navigation::item_buttons()->add_item_button(array('icon' => 'icon-arrow-down', 'link' => 'item@checkin', 'text' => __('site.check_in_item')))->add_item_button(array('icon' => 'icon-arrow-up', 'link' => 'item@checkout', 'text' => __('site.check_out_item')))->get_item_buttons();
Asset::style('jquicss', 'app/assets/css/jquery-ui-1.10.2.custom.min.css', 'jquery');
Asset::script('jquijs', 'app/assets/js/jquery-ui-1.10.2.custom.js', 'jquery');
Asset::script('datepicker', 'app/assets/js/jquery.ui.datepicker-' . Config::get('application.language') . '.js', 'jquery');
if ($id != null) {
$id = trim(filter_var($id, FILTER_SANITIZE_NUMBER_INT));
$item = $this->fetch_item('id', $id);
} else {
$item = null;
}
return View::make('layout.index')->nest('header', 'layout.blocks.header', array('submenu' => $this->submenu))->nest('main', 'item.checkout', array('item' => $item, 'status' => $this->status, 'item_buttons' => $this->item_buttons));
}
示例2: testContainerMethodsCanBeDynamicallyCalled
/**
* Test the Asset::__callStatic method.
*
* @group laravel
*/
public function testContainerMethodsCanBeDynamicallyCalled()
{
Asset::style('common', 'common.css');
$this->assertEquals('common.css', Asset::container()->assets['style']['common']['source']);
}
示例3: head
/**
* Head
*
* Assemble and return HTML head components - namely meta tags, CSS and
* JavaScript files - derived from the configuration file.
*
* @access public
* @return string HTML head components
*/
public static function head()
{
$html = '';
// Register CSS assets from Xtatic config file
foreach (Config::get('xtatic::xtatic.css') as $css) {
$name = $css['name'];
$source = $css['source'];
$dependencies = !empty($css['dependencies']) ? $css['dependencies'] : array();
$attributes = !empty($css['attributes']) ? $css['attributes'] : array();
Asset::style($name, $source, $dependencies, $attributes);
}
// Register JS assets from Xtatic config file
foreach (Config::get('xtatic::xtatic.js') as $js) {
$name = $js['name'];
$source = $js['source'];
$dependencies = !empty($js['dependencies']) ? $js['dependencies'] : array();
$attributes = !empty($js['attributes']) ? $js['attributes'] : array();
Asset::container(Config::get('xtatic::xtatic.header_asset_container'))->script($name, $source, $dependencies, $attributes);
}
// Assemble <meta> tags
switch (TRUE) {
case !Config::get('xtatic::xtatic.allow_search_engines_to_index'):
$html .= static::meta_tag(array('robots' => 'noindex,nofollow'));
break;
case !empty(static::$page_meta['meta_robots']):
$html .= static::meta_tag(array('robots' => static::$page_meta['meta_robots']));
break;
default:
//
}
if (!empty(static::$page_meta['meta_description'])) {
$html .= static::meta_tag(array('description' => static::$page_meta['meta_description']));
}
if (!empty(static::$page_meta['meta_keywords'])) {
$html .= static::meta_tag(array('keywords' => static::$page_meta['meta_keywords']));
}
// Get CSS styles
$html .= Asset::styles();
// Get JS scripts
$html .= Asset::container(Config::get('xtatic::xtatic.header_asset_container'))->scripts();
// Get Google Analytics tracking code
$html .= static::javascript(static::google_analytics());
$html .= Asset::scripts();
// Get inline JS
$html .= static::javascript(static::$js_in_head);
return $html;
}
示例4: function
Asset::script('swf', '/app/assets/js/uploadify/swfobject.js', 'app');
Asset::script('uploadify', '/app/assets/js/uploadify/jquery.uploadify.v2.1.4.min.js', 'app');
Asset::script('project', '/app/assets/js/project.js', 'uploadify');
if (!isset($view->sidebar)) {
$view->with('sidebar', View::make('project.sidebar'));
}
$view->active = 'projects';
});
View::composer('todo.index', function ($view) {
Asset::script('app', 'app/assets/js/todo.js', 'jquery');
});
View::composer('user.issues', function ($view) {
Asset::script('app', 'app/assets/js/todo-issues.js', 'jquery');
});
View::composer('layouts.login', function ($view) {
Asset::style('login', 'app/assets/css/login.css');
});
Event::listen('404', function () {
return Response::error('404');
});
Event::listen('500', function () {
return Response::error('500');
});
/*
|--------------------------------------------------------------------------
| Filters
|--------------------------------------------------------------------------
*/
Route::filter('before', function () {
});
Route::filter('after', function ($response) {
示例5: array
<?php
return array('layouts.admin.default' => array('name' => 'admin_layout', function ($view) {
Asset::script('jquery', 'js/jquery-1.7.1.js');
Asset::script('twipsy', 'js/twipsy.js');
Asset::script('admin', 'js/admin.js');
Asset::style('bootstrap', 'css/bootstrap.css');
Asset::style('admin', 'css/admin.css');
$view->nest('header', 'partials.header');
$view->nest('footer', 'partials.footer');
}), 'layouts.site.default' => array('name' => 'site_layout', function ($view) {
Asset::script('jquery', 'js/jquery-1.7.1.js');
Asset::script('site', 'js/site.js');
Asset::style('bootstrap', 'css/bootstrap.css');
Asset::style('site', 'css/site.css');
$view->nest('header', 'partials.header');
$view->nest('nav', 'partials.nav');
$view->nest('footer', 'partials.footer');
}));
示例6: function
$role->save();
// Assign the Permission to the Role
$role->permissions()->sync(array($permission->id));
*/
/*
|--------------------------------------------------------------------------
| Composing
|--------------------------------------------------------------------------
*/
View::composer('layout.index', function ($view) {
Asset::style('bootstrapcss', 'app/assets/css/bootstrap.min.css');
Asset::style('datatablescss', 'app/assets/css/jquery.dataTables.css');
Asset::style('apprisecss', 'app/assets/css/apprise-v2.css');
Asset::style('style', 'app/assets/css/style.css');
Asset::style('bs_css', 'app/assets/css/bootstrap-tagsinput.css');
Asset::script('jquery', 'app/assets/js/jquery-1.9.1.min.js');
Asset::script('bootstrap', 'app/assets/js/bootstrap.min.js');
Asset::script('datatables', 'app/assets/js/jquery.dataTables.min.js');
Asset::script('apprise', 'app/assets/js/apprise-v2.min.js', 'jquery');
Asset::script('bs_input_script', 'app/assets/js/bootstrap-tagsinput.js');
});
/*
|--------------------------------------------------------------------------
| Application 404 & 500 Error Handlers
|--------------------------------------------------------------------------
|
| To centralize and simplify 404 handling, Laravel uses an awesome event
| system to retrieve the response. Feel free to modify this function to
| your tastes and the needs of your application.
|