Skip to content

Commit 659a824

Browse files
committed
Fix coding style in generated Tiny editor plugins
1 parent ff95621 commit 659a824

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

classes/local/util/manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ protected function prepare_tiny_files() {
835835
$this->prepare_file_skeleton($commonjsfile, 'base', 'tiny/common_js');
836836

837837
$pluginfofile = 'classes/plugininfo.php';
838-
$this->prepare_file_skeleton($pluginfofile, 'base', 'tiny/plugininfo_php');
838+
$this->prepare_file_skeleton($pluginfofile, 'php_single_file', 'tiny/plugininfo_php');
839839

840840
$commandsjsfile = 'amd/src/commands.js';
841841
$addcommandsfile = function() use ($commandsjsfile) {

skel/file/tiny/plugininfo_php.mustache

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ class plugininfo extends plugin{{!
6363
}} {
6464
{{# self.defines_buttons }}
6565

66+
/**
67+
* Get a list of the buttons provided by this plugin.
68+
*
69+
* @return array
70+
*/
6671
public static function get_available_buttons(): array {
6772
return [
6873
'{{ component }}/plugin',
@@ -71,6 +76,11 @@ class plugininfo extends plugin{{!
7176
{{/ self.defines_buttons }}
7277
{{# self.defines_menuitems }}
7378

79+
/**
80+
* Get a list of the menu items provided by this plugin.
81+
*
82+
* @return array
83+
*/
7484
public static function get_available_menuitems(): array {
7585
return [
7686
'{{ component }}/plugin',
@@ -79,6 +89,11 @@ class plugininfo extends plugin{{!
7989
{{/ self.defines_menuitems }}
8090
{{# self.defines_options }}
8191

92+
/**
93+
* Allows to pass to pass options from the PHP to the JavaScript API of the plugin.
94+
*
95+
* @return array
96+
*/
8297
public static function get_plugin_configuration_for_context(
8398
context $context,
8499
array $options,

0 commit comments

Comments
 (0)