public function yui_module($modules, $function, array $arguments = null, $galleryversion = null, $ondomready = false) {
        if (!is_array($modules)) {
            $modules = array($modules);
        }

        if ($galleryversion != null) {
            debugging('The galleryversion parameter to yui_module has been deprecated since Moodle 2.3.');
        }

        $jscode = 'Y.use('.join(',', array_map('json_encode', convert_to_array($modules))).',function() {'.js_writer::function_call($function, $arguments).'});';
        if ($ondomready) {
            $jscode = "Y.on('domready', function() { $jscode });";
        }
        $this->jsinitcode[] = $jscode;
    }
public function yui_module($modules, $function, array $arguments = null, $galleryversion = null, $ondomready = false) {
        if (!is_array($modules)) {
            $modules = array($modules);
        }

        if ($galleryversion != null) {
            debugging('The galleryversion parameter to yui_module has been deprecated since Moodle 2.3.');
        }

        $jscode = 'Y.use('.join(',', array_map('json_encode', convert_to_array($modules))).',function() {'.js_writer::function_call($function, $arguments).'});';
        if ($ondomready) {
            $jscode = "Y.on('domready', function() { $jscode });";
        }
        $this->jsinitcode[] = $jscode;
    }
public function yui_module ( $ modules , $ function , array $ arguments = null , $ galleryversion = null , $ ondomready = false ) { if ( ! is_array ( $ modules ) ) { $ modules = array ( $ modules ) ; } if ( $ galleryversion != null ) { debugging ( 'The galleryversion parameter to yui_module has been deprecated since Moodle 2.3.' ) ; } $ jscode = 'Y.use(' . join ( ',' , array_map ( 'json_encode' , convert_to_array ( $ modules ) ) ) . ',function() {' . js_writer :: function_call ( $ function , $ arguments ) . '});' ; if ( $ ondomready ) { $ jscode = "Y.on('domready', function() { $jscode });" ; } $ this -> jsinitcode [ ] = $ jscode ; }
Creates a JavaScript function call that requires one or more modules to be loaded.

This function can be used to include all of the standard YUI module types within JavaScript:
- YUI3 modules    [node, event, io]
- YUI2 modules    [yui2-*]
- Moodle modules  [moodle-*]
- Gallery modules [gallery-*]

Before writing new code that makes extensive use of YUI, you should consider it's replacement AMD/JQuery.
@see js_call_amd()

@param array|string $modules One or more modules
@param string $function The function to call once modules have been loaded
@param array $arguments An array of arguments to pass to the function
@param string $galleryversion Deprecated: The gallery version to use
@param bool $ondomready
Creates a JavaScript function call that requires one or more modules to be loaded .