mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-59380-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
542933e30a
@ -34,16 +34,16 @@ namespace core\output;
|
|||||||
*/
|
*/
|
||||||
class mustache_javascript_helper {
|
class mustache_javascript_helper {
|
||||||
|
|
||||||
/** @var page_requirements_manager $requires - Page requirements manager for collecting JS calls. */
|
/** @var moodle_page $page - Page used to get requirement manager */
|
||||||
private $requires = null;
|
private $page = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new instance of mustache javascript helper.
|
* Create new instance of mustache javascript helper.
|
||||||
*
|
*
|
||||||
* @param page_requirements_manager $requires Page requirements manager.
|
* @param moodle_page $page Page.
|
||||||
*/
|
*/
|
||||||
public function __construct($requires) {
|
public function __construct($page) {
|
||||||
$this->requires = $requires;
|
$this->page = $page;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,6 +54,6 @@ class mustache_javascript_helper {
|
|||||||
* @param \Mustache_LambdaHelper $helper Used to render the content of this block.
|
* @param \Mustache_LambdaHelper $helper Used to render the content of this block.
|
||||||
*/
|
*/
|
||||||
public function help($text, \Mustache_LambdaHelper $helper) {
|
public function help($text, \Mustache_LambdaHelper $helper) {
|
||||||
$this->requires->js_amd_inline($helper->render($text));
|
$this->page->requires->js_amd_inline($helper->render($text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class renderer_base {
|
|||||||
$loader = new \core\output\mustache_filesystem_loader();
|
$loader = new \core\output\mustache_filesystem_loader();
|
||||||
$stringhelper = new \core\output\mustache_string_helper();
|
$stringhelper = new \core\output\mustache_string_helper();
|
||||||
$quotehelper = new \core\output\mustache_quote_helper();
|
$quotehelper = new \core\output\mustache_quote_helper();
|
||||||
$jshelper = new \core\output\mustache_javascript_helper($this->page->requires);
|
$jshelper = new \core\output\mustache_javascript_helper($this->page);
|
||||||
$pixhelper = new \core\output\mustache_pix_helper($this);
|
$pixhelper = new \core\output\mustache_pix_helper($this);
|
||||||
$shortentexthelper = new \core\output\mustache_shorten_text_helper();
|
$shortentexthelper = new \core\output\mustache_shorten_text_helper();
|
||||||
$userdatehelper = new \core\output\mustache_user_date_helper();
|
$userdatehelper = new \core\output\mustache_user_date_helper();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user