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


PHP HTML::script方法代码示例

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


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

示例1: renderScripts

    public static function renderScripts(){
    
    
         if (count(self::$_scripts) == 0)
            return FALSE; 
    

         self::$_scripts = array_unique(self::$_scripts);

           // kohana:: $environment
         if ( kohana::$environment == Kohana::DEVELOPMENT){
    
            foreach (self::$_scripts as $js){
              
                echo HTML::script("media/scripts/".$js);
              
            }
            
         }else{
                                              
            $js = implode( ",", self::$_scripts);
           
            ?><script type="text/javascript" src="<?php 
echo url::base();
?>
min/index.php?b=media/scripts&amp;f=<?php 
echo $js;
?>
"></script><?
                     
         }
                                                                         
    
    }
开发者ID:kippel,项目名称:kippel-util,代码行数:34,代码来源:media.php

示例2: reset_database

 public function reset_database()
 {
     $this->layout->title = "NOSH ChartingSystem Reset Database";
     $this->layout->style = '';
     $this->layout->script = HTML::script('/js/reset.js');
     $this->layout->content = View::make('reset_database');
 }
开发者ID:akratech,项目名称:nosh-core,代码行数:7,代码来源:InstallController.php

示例3: addScript

 /**
  * Add script
  *
  * @param   string  $path
  * @param   string  $group
  */
 public function addScript($path, $group = 'default')
 {
     if (Filesystem::getExtension($path) == 'js') {
         isset($this->scripts->{$group}) or $this->scripts->{$group} = new Core_ArrayObject();
         $this->scripts->{$group}->{$path} = HTML::script(self::preparePath($path));
     }
 }
开发者ID:romartyn,项目名称:cogear,代码行数:13,代码来源:Harvester.php

示例4: showUpdate

 /**
  *     add/update agency
  *     @param  integer $id 
  */
 function showUpdate($id = 0)
 {
     $this->data['id'] = $id;
     View::share('jsTag', HTML::script("{$this->assetURL}js/select.js"));
     // get list Category
     $categoryModel = new CategoryBaseModel();
     $this->data['listCategory'] = $categoryModel->getAllForm(0);
     // get list Ad Format
     $AdFormatModel = new AdFormatBaseModel();
     $this->data['listAdFormat'] = $AdFormatModel->getAllForm();
     // get list Type
     $this->data['listAdType'] = Config::get('data.ad_type');
     // get list Wmode
     $this->data['listWmode'] = Config::get('data.wmode');
     // WHEN UPDATE SHOW CURRENT INFOMATION
     if ($id != 0) {
         $item = $this->model->with('campaign', 'adFormat')->find($id);
         if ($item) {
             $this->data['item'] = $item;
         } else {
             return Redirect::to($this->moduleURL . 'show-list');
         }
     }
     if (Request::isMethod('post')) {
         if ($this->postUpdate($id, $this->data)) {
             return $this->redirectAfterSave(Input::get('save'));
         }
     }
     $this->layout->content = View::make('showUpdate', $this->data);
 }
开发者ID:huycao,项目名称:yoplatform,代码行数:34,代码来源:AdFlightAdvertiserManagerController.php

示例5: showUpdate

 /**
  *     add/update agency
  *     @param  integer $id 
  */
 function showUpdate($id = 0)
 {
     $this->data['id'] = $id;
     View::share('jsTag', HTML::script("{$this->assetURL}js/select.js"));
     // get list country
     $countryModel = new CountryBaseModel();
     $this->data['listCountry'] = $countryModel->getAllForm();
     // get list Category
     $categoryModel = new CategoryBaseModel();
     $this->data['listCategory'] = $categoryModel->getAllForm();
     // get expected close month
     $this->data['listExpectedCloseMonth'] = getMonthRange();
     // get list Currency
     $currencyModel = new CurrencyBaseModel();
     $this->data['listCurrency'] = $currencyModel->getAllForm();
     // get list Sale Status
     $this->data['listSaleStatus'] = Config::get('data.sale_status');
     $this->loadLeftMenu('menu.campaignList');
     // WHEN UPDATE SHOW CURRENT INFORMATION
     if ($id != 0) {
         $item = $this->model->with('agency', 'advertiser', 'sale', 'campaign_manager')->find($id);
         if ($item) {
             $this->data['item'] = $item;
             $this->loadLeftMenu('menu.campaignUpdate', array('item' => $item));
         } else {
             return Redirect::to($this->moduleURL . 'show-list');
         }
     }
     if (Request::isMethod('post')) {
         if ($this->postUpdate($id, $this->data)) {
             return Redirect::to($this->moduleURL . 'view/' . $this->data['id']);
         }
     }
     $this->layout->content = View::make('showUpdate', $this->data);
 }
开发者ID:huycao,项目名称:yoplatform,代码行数:39,代码来源:CampaignAdvertiserManagerController.php

示例6: showUpdate

 /**
  *     add/update agency
  *     @param  integer $id 
  */
 function showUpdate($id = 0)
 {
     $this->data['id'] = $id;
     View::share('jsTag', HTML::script("{$this->assetURL}js/select.js"));
     // get list Category
     $categoryModel = new CategoryBaseModel();
     $this->data['listCategory'] = $categoryModel->getAllForm(0, 0, 'Run of Network');
     // get list Flight Objective
     $this->data['listFlightObjective'] = Config::get('data.flight_objective');
     $this->loadLeftMenu('menu.flightList');
     // WHEN UPDATE SHOW CURRENT INFOMATION
     if ($id != 0) {
         $this->loadLeftMenu('menu.flightUpdate');
         $item = $this->model->with('category', 'campaign', 'publisher', 'publisherSite', 'publisher_ad_zone')->find($id);
         if ($item) {
             $this->data['item'] = $item;
         } else {
             return Redirect::to($this->moduleURL . 'show-list');
         }
     }
     if (Request::isMethod('post')) {
         if ($this->postUpdate($id, $this->data)) {
             return $this->redirectAfterSave(Input::get('save'));
         }
     }
     $this->layout->content = View::make('showUpdate', $this->data);
 }
开发者ID:huycao,项目名称:yoplatform,代码行数:31,代码来源:FlightPublisherAdvertiserManagerController.php

示例7: add

 public static function add($url, $attributes = array())
 {
     if (Str::endsWith($url, '.js')) {
         $url .= '?v=' . rand(0, 999);
         $asset = \HTML::script($url, $attributes);
         $nscript = array('url' => $url, 'html' => $asset);
         $am = Session::get('asset_manager_js', array());
         foreach ($am as $script) {
             if ($url == $script['url']) {
                 return false;
             }
         }
         $am[] = $nscript;
         Session::put('asset_manager_js', $am);
     } elseif (Str::endsWith($url, '.css')) {
         $url .= '?v=' . rand(0, 999);
         $asset = \HTML::style($url, $attributes);
         $nstyle = array('url' => $url, 'html' => $asset);
         $am = Session::get('asset_manager_css', array());
         foreach ($am as $style) {
             if ($url == $style['url']) {
                 return false;
             }
         }
         $am[] = $nstyle;
         Session::put('asset_manager_css', $am);
         return true;
     }
 }
开发者ID:JorgeVasquezRetamal,项目名称:Personal,代码行数:29,代码来源:Asset.php

示例8: action_make

 public function action_make()
 {
     echo HTML::script('media/js/qrcode.min.js');
     $text = Arr::get($_GET, 'text', '');
     $width = Arr::get($_GET, 'width', '');
     echo QRJS::makecode($text, $width);
     exit;
 }
开发者ID:andygoo,项目名称:kohana,代码行数:8,代码来源:Qrcode.php

示例9: get_scripts_html

 /**
  * Gets the default js scripts for the rte
  * 
  * @return string
  */
 public static function get_scripts_html()
 {
     $html = array();
     foreach (self::_get_config('scripts') as $script) {
         $html[] = HTML::script(url::base() . $script);
     }
     return implode("\n", $html);
 }
开发者ID:JDStraughan,项目名称:kohana-lwrte,代码行数:13,代码来源:lwrte.php

示例10: get_jquery

function get_jquery($echo = false)
{
    if ($echo == true) {
        echo HTML::script('/assets/js/jquery.js');
    } else {
        return HTML::script('/assets/js/jquery.js');
    }
}
开发者ID:enakee,项目名称:lv-mlm-system,代码行数:8,代码来源:config.php

示例11: hookHead

 /**
  * Вывод глобальный переменных в заголовке
  */
 public function hookHead()
 {
     $cogear = new Core_ArrayObject();
     $cogear->settings = new Core_ArrayObject();
     $cogear->settings->site = SITE_URL;
     event('assets.js.global', $cogear);
     echo HTML::script("var cogear = cogear || " . json_encode($cogear) . ";\n\n            window.cogear = cogear;", array(), TRUE);
 }
开发者ID:brussens,项目名称:cogear2,代码行数:11,代码来源:Gear.php

示例12: script

 /**
  * 脚本别名加载(支持批量加载,后期可拓展为自动多文件压缩合并)
  * @return string
  */
 function script()
 {
     $scriptArray = array_map(function ($aliases) {
         $jsUrl = asset_static($aliases);
         return HTML::script($jsUrl);
     }, func_get_args());
     return implode('', array_filter($scriptArray));
 }
开发者ID:hewangxu,项目名称:hmevent,代码行数:12,代码来源:Base.func.php

示例13: include_library

 /**
  * 
  * get the JS library that we need to generate charts
  * @param  boolean $force forces the inclusion
  * @return string
  */
 public static function include_library($force = FALSE)
 {
     if (self::$included_lib == FALSE or $force == TRUE) {
         self::$included_lib = TRUE;
         return HTML::script((Core::is_HTTPS() ? 'https:' : 'http:') . '//www.google.com/jsapi') . PHP_EOL;
     }
     return FALSE;
 }
开发者ID:nick-catanchin-ie,项目名称:common,代码行数:14,代码来源:chart.php

示例14: scripts

 public function scripts()
 {
     $this->addCustomScripts();
     $result = '';
     foreach ($this->scripts as $i => $file) {
         $result .= \HTML::script($file);
     }
     return $result;
 }
开发者ID:binaryk,项目名称:terenuripedia,代码行数:9,代码来源:Datareport.php

示例15: testGeneratingScript

 /**
  * Test generating a link to JavaScript files
  *
  * @group laravel
  */
 public function testGeneratingScript()
 {
     $html1 = HTML::script('foo.js');
     $html2 = HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js');
     $html3 = HTML::script('foo.js', array('type' => 'text/javascript'));
     $this->assertEquals('<script src="http://localhost/foo.js"></script>' . PHP_EOL, $html1);
     $this->assertEquals('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>' . PHP_EOL, $html2);
     $this->assertEquals('<script src="http://localhost/foo.js" type="text/javascript"></script>' . PHP_EOL, $html3);
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:14,代码来源:html.test.php


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