66 * @author Andreas Gohr <[email protected] > 77 */
88
9- if (! defined ( ' DOKU_INC ' )) die () ;
10- if (! defined ( ' DOKU_PLUGIN ' )) define ( ' DOKU_PLUGIN ' , DOKU_INC . ' lib/plugins/ ' ) ;
9+ use dokuwiki \ Form \ Form ;
10+ use dokuwiki \ Utf8 ;
1111
1212/**
1313 * handles all the editor related things
@@ -83,7 +83,7 @@ public function editform(Doku_Event $event)
8383 /** @var Doku_Form $form */
8484 $ form =& $ event ->data ['form ' ];
8585
86- if (is_a ($ form , dokuwiki \ Form \ Form::class)) { // $event->name is EDIT_FORM_ADDTEXTAREA
86+ if (is_a ($ form , Form::class)) { // $event->name is EDIT_FORM_ADDTEXTAREA
8787 // data for handsontable
8888 $ form ->setHiddenField ('edittable_data ' , $ Renderer ->getDataJSON ());
8989 $ form ->setHiddenField ('edittable_meta ' , $ Renderer ->getMetaJSON ());
@@ -143,7 +143,8 @@ public function handle_table_post(Doku_Event $event)
143143 * @param array $meta meta data for each cell
144144 * @return string
145145 */
146- public function build_table ($ data , $ meta ) {
146+ public function build_table ($ data , $ meta )
147+ {
147148 $ table = '' ;
148149 $ rows = count ($ data );
149150 $ cols = $ rows ? count ($ data [0 ]) : 0 ;
@@ -153,7 +154,7 @@ public function build_table($data, $meta) {
153154 // find maximum column widths
154155 for ($ row = 0 ; $ row < $ rows ; $ row ++) {
155156 for ($ col = 0 ; $ col < $ cols ; $ col ++) {
156- $ len = dokuwiki \ Utf8 \PhpString::strlen ($ data [$ row ][$ col ]);
157+ $ len = Utf8 \PhpString::strlen ($ data [$ row ][$ col ]);
157158
158159 // alignment adds padding
159160 if ($ meta [$ row ][$ col ]['align ' ] == 'center ' ) {
0 commit comments