public static function get_content($component, $method, $args = array()) {
        global $OUTPUT, $PAGE, $USER;

        $params = self::validate_parameters(self::get_content_parameters(),
            array(
                'component' => $component,
                'method' => $method,
                'args' => $args
            )
        );

        // Reformat arguments into something less unwieldy.
        $arguments = array();
        foreach ($params['args'] as $paramargument) {
            $arguments[$paramargument['name']] = $paramargument['value'];
        }

        // The component was validated via the PARAM_COMPONENT parameter type.
        $classname = '\\' . $params['component'] .'\output\mobile';
        if (!method_exists($classname, $params['method'])) {
            throw new coding_exception("Missing method in $classname");
        }
        $result = call_user_func_array(array($classname, $params['method']), array($arguments));

        // Populate otherdata.
        $otherdata = array();
        if (!empty($result['otherdata'])) {
            $result['otherdata'] = (array) $result['otherdata'];
            foreach ($result['otherdata'] as $name => $value) {
                $otherdata[] = array(
                    'name' => $name,
                    'value' => $value
                );
            }
        }

        return array(
            'templates'  => !empty($result['templates']) ? $result['templates'] : array(),
            'javascript' => !empty($result['javascript']) ? $result['javascript'] : '',
            'otherdata'  => $otherdata,
            'files'      => !empty($result['files']) ? $result['files'] : array(),
            'restrict'   => !empty($result['restrict']) ? $result['restrict'] : array(),
        );
    }