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


PHP Assets::group方法代码示例

本文整理汇总了PHP中Assets::group方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::group方法的具体用法?PHP Assets::group怎么用?PHP Assets::group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assets的用法示例。


在下文中一共展示了Assets::group方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->_auth = Auth::instance();
     $this->_user = Auth::instance()->get_user();
     $this->_assets = new Assets();
     $this->_assets->group($this->_assets_group);
     $this->set_config_variable('base_url', $this->base_url());
 }
开发者ID:modulargaming,项目名称:core,代码行数:8,代码来源:View.php

示例2: testCommand

 public function testCommand()
 {
     app()->register(\Skimia\Assets\AssetsServiceProvider::class);
     $scannerMock = $this->getMockedScanner($this->getGeneratedFilePath());
     $this->assertFalse($scannerMock->loadScanned());
     $commandMock = $this->getMockedCommand($scannerMock, $this->getDirectories());
     //var_dump(Cache::get('skimia.assets.collections.builded', []));
     $this->invokeCommandWithPrompt($commandMock);
     $this->assertTrue($this->getCommandOutput()->contains('angularjs'));
     //verifie si la question a été posée
     $this->assertTrue($this->getCommandOutput()->contains('<ask>Update Assets'));
     $this->assertTrue(File::exists($this->getGeneratedFilePath()));
     require $this->getGeneratedFilePath();
     $this->assertArrayHasKey('js-stack', Assets::group('default')->getCollections());
     File::delete($this->getGeneratedFilePath());
 }
开发者ID:skimia,项目名称:assets,代码行数:16,代码来源:DumpCollectionsCommandTest.php

示例3: init_media

 public function init_media()
 {
     parent::init_media();
     $this->template_js_params['ACE_THEME'] = Config::get('ace', 'theme', 'textmate');
     $this->template_js_params['DEFAULT_FILTER'] = Config::get('site', 'default_filter_id', '');
     Assets::package(array('jquery', 'bootstrap', 'notify', 'select2', 'dropzone', 'fancybox', 'datepicker', 'underscore', 'core'));
     foreach (array('.js', '-message.js') as $file_name) {
         $filename = Kohana::$cache_dir . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, array('i18n', NULL)) . I18n::lang() . $file_name;
         if (file_exists($filename)) {
             Assets::js('i18n', BASE_URL . 'cms/cache/i18n/' . I18n::lang() . $file_name, 'global', FALSE, 0);
         }
     }
     $file = $this->request->controller();
     $directory = $this->request->directory();
     if (!empty($directory)) {
         $file = $directory . '/' . $file;
     }
     $file = strtolower($file);
     if (Kohana::find_file('media', FileSystem::normalize_path('js/controller/' . $file), 'js')) {
         Assets::js('controller.' . $file, ADMIN_RESOURCES . 'js/controller/' . $file . '.js', 'global', FALSE, 999);
     }
     Assets::group('global', 'events', '<script type="text/javascript">' . Assets::merge_files('js/events', 'js') . '</script>', 'global');
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:23,代码来源:backend.php

示例4: render

 /**
  * Генерация HTML кода CSS, JS, Meta
  * 
  * По умолчанию выводятся все группы CSS, JS, Meta, если вы выводите JS
  * код перед тегом </body>, то непобхимо передать параметр FALSE и сделать
  * вывод JS кода в нужно месте с помощью
  *		
  *		<?php echo Assets::js(); ?>
  * 
  * @param boolean $include_js Включить в вывод JavaScript
  * @return string
  */
 public function render($js_footer = FALSE)
 {
     $html = Assets::group('FRONTEND') . Assets::css() . Assets::js($js_footer);
     return $html;
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:17,代码来源:meta.php

示例5:

favicon.ico" rel="favourites icon" />

		<?php 
echo Assets::group('global', 'js_params');
?>
		<?php 
Observer::notify('layout_backend_head_before');
?>
		<?php 
echo Assets::css();
?>
		<?php 
echo Assets::js();
?>
		<?php 
echo Assets::group('global', 'events');
?>
		<?php 
Observer::notify('layout_backend_head_after');
?>
	</head>
	<body id="body_<?php 
echo $page_body_id;
?>
" class="<?php 
echo $request->query('type');
?>
 <?php 
echo $theme;
?>
 main-menu-fixed">
开发者ID:kodicms,项目名称:core,代码行数:31,代码来源:backend.php

示例6: js_group

 /**
  * Display a group of JS tags
  * @param  string $group
  * @param  array  $files
  * @return string
  */
 public static function js_group($group = null, $files = null)
 {
     self::$group = $group;
     self::init();
     // Start benchmark
     if (self::$_enable_benchmark) {
         self::$_ci->benchmark->mark("Assets::js_group(" . $group . ")_start");
     }
     // Add to process container
     self::_add_assets($files, $group, 'js');
     // And process it
     if (self::$_cache_info and self::$freeze) {
     } else {
         self::_process('js', $group);
     }
     // End benchmark
     if (self::$_enable_benchmark) {
         self::$_ci->benchmark->mark("Assets::js_group(" . $group . ")_end");
     }
     // Tags
     return self::_generate_tags('js');
 }
开发者ID:NaszvadiG,项目名称:Base-CodeIgniter-App,代码行数:28,代码来源:assets.php

示例7: all

 /**
  * Simply displays the generated tags
  * @param  string $type which assets should be displayed
  * @param  mixed  $css  CSS files
  * @param  mixed  $js   JS files
  * @param  array  $cfg
  * @return string
  */
 public static function all($type = 'all', $css = null, $js = null, $group = null, $cfg = null)
 {
     self::$group = $group;
     self::init();
     // Configuration
     if ($cfg) {
         self::configure($cfg);
     }
     // Overwrite CSS files
     if ($css) {
         self::$_css = array();
         self::_add_css($css, $group);
     }
     // Overwrite JS files
     if ($js) {
         self::$_js = array();
         self::_add_js($js, $group);
     }
     // Display all the tags
     echo self::get($type);
 }
开发者ID:Autobahnpanzer,项目名称:mamrudsmuskovics,代码行数:29,代码来源:assets.php

示例8: after

 /**
  * Assigns the template [View] as the request response.
  */
 public function after()
 {
     parent::after();
     if ($this->auto_render === TRUE) {
         if ($this->request->is_ajax() === TRUE or $this->json !== NULL) {
             if ($this->json !== NULL) {
                 if (is_array($this->json) and !isset($this->json['status'])) {
                     $this->json['status'] = TRUE;
                 }
                 $this->response->headers('Content-type', 'application/json');
                 $this->template = json_encode($this->json);
             } else {
                 $this->only_content = TRUE;
             }
         } else {
             $js_string = '';
             foreach ($this->template_js_params as $var => $value) {
                 $value = json_encode($value);
                 $js_string .= "var {$var} = {$value};\n";
             }
             Assets::group('global', 'js_params', '<script type="text/javascript">' . $js_string . '</script>', 'global');
         }
         if ($this->only_content) {
             $this->template = $this->template->content;
         }
         if ($this->template instanceof View) {
             $this->template->set('request', $this->request);
         }
         Observer::notify('template_before_render', $this->request);
         $this->response->body($this->template);
     }
 }
开发者ID:kodicms,项目名称:core,代码行数:35,代码来源:Template.php


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