Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 28... Línea 28...
28
use context_system;
28
use context_system;
29
use editor_tiny\editor;
29
use editor_tiny\editor;
30
use editor_tiny\plugin;
30
use editor_tiny\plugin;
31
use editor_tiny\plugin_with_buttons;
31
use editor_tiny\plugin_with_buttons;
32
use editor_tiny\plugin_with_configuration;
32
use editor_tiny\plugin_with_configuration;
-
 
33
use editor_tiny\plugin_with_configuration_for_external;
33
use editor_tiny\plugin_with_menuitems;
34
use editor_tiny\plugin_with_menuitems;
34
use filter_manager;
35
use filter_manager;
Línea 35... Línea 36...
35
 
36
 
36
/**
37
/**
37
 * Tiny equation plugin.
38
 * Tiny equation plugin.
38
 *
39
 *
39
 * @package    tiny_equation
40
 * @package    tiny_equation
40
 * @copyright  2022 Huong Nguyen <huongnv13@gmail.com>
41
 * @copyright  2022 Huong Nguyen <huongnv13@gmail.com>
41
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
42
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
42
 */
43
 */
-
 
44
class plugininfo extends plugin implements
-
 
45
    plugin_with_buttons,
-
 
46
    plugin_with_menuitems,
-
 
47
    plugin_with_configuration,
Línea 43... Línea 48...
43
class plugininfo extends plugin implements plugin_with_buttons, plugin_with_menuitems, plugin_with_configuration {
48
    plugin_with_configuration_for_external {
44
 
49
 
45
    public static function get_available_buttons(): array {
50
    public static function get_available_buttons(): array {
46
        return [
51
        return [
Línea 101... Línea 106...
101
            'contextid' => $context->id,
106
            'contextid' => $context->id,
102
            'libraries' => $libraries,
107
            'libraries' => $libraries,
103
            'texdocsurl' => get_docs_url('Using_TeX_Notation'),
108
            'texdocsurl' => get_docs_url('Using_TeX_Notation'),
104
        ];
109
        ];
105
    }
110
    }
-
 
111
 
-
 
112
    #[\Override]
-
 
113
    public static function get_plugin_configuration_for_external(context $context): array {
-
 
114
        $settings = self::get_plugin_configuration_for_context($context, [], []);
-
 
115
        return [
-
 
116
            'texfilter' => $settings['texfilter'] ? '1' : '0',
-
 
117
            'libraries' => json_encode($settings['libraries']),
-
 
118
            'texdocsurl' => $settings['texdocsurl'],
-
 
119
        ];
-
 
120
    }
106
}
121
}