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


PHP block_base::get_required_javascript方法代码示例

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


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

示例1:

 function get_required_javascript()
 {
     parent::get_required_javascript();
     $this->page->requires->jquery();
     $this->page->requires->jquery_plugin('ui');
     $this->page->requires->jquery_plugin('ui-css');
 }
开发者ID:jb-1980,项目名称:ungraded_assignments,代码行数:7,代码来源:block_ungraded_assignments.php

示例2: get_required_javascript

 public function get_required_javascript()
 {
     global $PAGE;
     $PAGE->requires->yui_module('moodle-block_databasebookmarks-bookmark', 'M.block_databasebookmarks.bookmark.init');
     $PAGE->requires->strings_for_js(array('deletebookmark', 'bookmark', 'bookmarkname', 'bookmarkheader'), 'block_databasebookmarks');
     $PAGE->requires->strings_for_js(array('buttons'), 'mod_data');
     return parent::get_required_javascript();
 }
开发者ID:andrewhancox,项目名称:block_databasebookmarks,代码行数:8,代码来源:block_databasebookmarks.php

示例3: get_required_javascript

 public function get_required_javascript()
 {
     parent::get_required_javascript();
     $this->page->requires->jquery();
     $this->page->requires->jquery_plugin('ui');
     $this->page->requires->jquery_plugin('ui-css');
     $this->page->requires->js('/blocks/slideshow/js/jquery.cycle2.min.js');
     $this->page->requires->js('/blocks/slideshow/js/spectrum.js');
 }
开发者ID:ptabak,项目名称:moodle-block_slideshow,代码行数:9,代码来源:block_slideshow.php

示例4: get_required_javascript

 /**
  * The block depends upon a React app (which should only be loaded once).
  * Unfortunately, it is necessary to use the Moodle page requirements manager.
  * It is also necessary to hide RequireJS from the React app.
  */
 public function get_required_javascript()
 {
     parent::get_required_javascript();
     // if debugging, load unminified script
     $script_src = 'build/activity_tree.min.js';
     if (debugging()) {
         $script_src = str_replace('.min.js', '.js', $script_src);
     }
     /** @var page_requirements_manager $prm */
     $prm = $this->page->requires;
     $prm->js('/blocks/activity_tree/static/js/other/requirejs_hide.js');
     $prm->js(new moodle_url('/blocks/activity_tree/static/js/' . $script_src));
     $prm->js('/blocks/activity_tree/static/js/other/requirejs_show.js');
 }
开发者ID:robologo3000,项目名称:block-activity-tree,代码行数:19,代码来源:block_activity_tree.php

示例5: array

 /**
  * Gets Javascript that may be required for navigation
  */
 function get_required_javascript()
 {
     global $CFG;
     parent::get_required_javascript();
     $limit = 20;
     if (!empty($CFG->navcourselimit)) {
         $limit = $CFG->navcourselimit;
     }
     $expansionlimit = 0;
     if (!empty($this->config->expansionlimit)) {
         $expansionlimit = $this->config->expansionlimit;
     }
     $arguments = array('id' => $this->instance->id, 'instance' => $this->instance->id, 'candock' => $this->instance_can_be_docked(), 'courselimit' => $limit, 'expansionlimit' => $expansionlimit);
     $this->page->requires->string_for_js('viewallcourses', 'moodle');
     $this->page->requires->yui_module('moodle-block_navigation-navigation', 'M.block_navigation.init_add_tree', array($arguments));
 }
开发者ID:helenagarcia90,项目名称:moodle-esi,代码行数:19,代码来源:block_navigation.php

示例6: array

 function get_required_javascript()
 {
     global $PAGE;
     $adminnodeid = null;
     $adminnode = $PAGE->settingsnav->find('siteadministration', navigation_node::TYPE_SITE_ADMIN);
     if (!empty($adminnode)) {
         $adminnodeid = $adminnode->id;
     }
     parent::get_required_javascript();
     $arguments = array('id' => $this->instance->id, 'instance' => $this->instance->id, 'candock' => $this->instance_can_be_docked());
     $this->page->requires->js_call_amd('block_settings/settingsblock', 'init', array($adminnodeid));
 }
开发者ID:rushi963,项目名称:moodle,代码行数:12,代码来源:block_settings.php

示例7: array

 function get_required_javascript()
 {
     global $PAGE;
     $adminnode = $PAGE->settingsnav->find('siteadministration', navigation_node::TYPE_SITE_ADMIN);
     parent::get_required_javascript();
     $arguments = array('instanceid' => $this->instance->id, 'adminnodeid' => $adminnode ? $adminnode->id : null);
     $this->page->requires->js_call_amd('block_settings/settingsblock', 'init', $arguments);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:8,代码来源:block_settings.php

示例8: array

 /**
  * Gets Javascript that may be required for navigation
  */
 function get_required_javascript()
 {
     parent::get_required_javascript();
     $arguments = array('instanceid' => $this->instance->id);
     $this->page->requires->string_for_js('viewallcourses', 'moodle');
     $this->page->requires->js_call_amd('block_navigation/navblock', 'init', $arguments);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:10,代码来源:block_navigation.php

示例9: get_required_javascript

 public function get_required_javascript()
 {
     global $CFG;
     parent::get_required_javascript();
     $this->page->requires->jquery();
     $this->page->requires->jquery_plugin('ui');
     $this->page->requires->jquery_plugin('ui-css');
     $this->page->requires->js('/blocks/playlyfe/js/plupload.full.min.js');
     $this->page->requires->js('/blocks/playlyfe/block_playlyfe.js');
     $this->page->requires->js_init_call('init_cfg', array(array('root' => $CFG->wwwroot)));
 }
开发者ID:sriysk,项目名称:moodle-integration,代码行数:11,代码来源:block_playlyfe.php

示例10: array

 function get_required_javascript()
 {
     parent::get_required_javascript();
     $arguments = array('id' => $this->instance->id, 'instance' => $this->instance->id, 'candock' => $this->instance_can_be_docked());
     $this->page->requires->yui_module('moodle-block_navigation-navigation', 'M.block_navigation.init_add_tree', array($arguments));
 }
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:6,代码来源:block_settings.php

示例11: array

 /**
  * Gets Javascript that may be required for navigation
  */
 function get_required_javascript()
 {
     parent::get_required_javascript();
     $this->page->requires->string_for_js('viewallcourses', 'moodle');
     $this->page->requires->js_call_amd('block_navigation/navblock', 'init', array());
 }
开发者ID:rushi963,项目名称:moodle,代码行数:9,代码来源:block_navigation.php


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