当前位置: 首页>>代码示例>>PHP>>正文


PHP Asset::style方法代码示例

本文整理汇总了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));
 }
开发者ID:sresoft,项目名称:noark_simple_inventory,代码行数:23,代码来源:item.php

示例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']);
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:10,代码来源:asset.test.php

示例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;
 }
开发者ID:SerdarSanri,项目名称:Laravel-Xtatic,代码行数:56,代码来源:xtatic.php

示例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) {
开发者ID:eliasyanni,项目名称:bugs,代码行数:31,代码来源:routes.php

示例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');
}));
开发者ID:rebelnz,项目名称:rebelcms,代码行数:19,代码来源:composers.php

示例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.
|
开发者ID:sresoft,项目名称:noark_simple_inventory,代码行数:31,代码来源:routes.php


注:本文中的Asset::style方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。