@@ -59,7 +59,7 @@ public function __construct($uniqueid, \moodle_url $url, $perpage = 100) {
5959
6060 $ this ->set_attribute ('id ' , 'tooltriggerrules_table ' );
6161 $ this ->set_attribute ('class ' , 'tooltrigger managerules generaltable generalbox ' );
62- $ this ->define_columns (array (
62+ $ this ->define_columns ([
6363 'name ' ,
6464 'description ' ,
6565 'eventname ' ,
@@ -68,9 +68,9 @@ public function __construct($uniqueid, \moodle_url $url, $perpage = 100) {
6868 'numsteps ' ,
6969 'lasttriggered ' ,
7070 'triggerhistory ' ,
71- 'manage '
72- ) );
73- $ this ->define_headers (array (
71+ 'manage ' ,
72+ ] );
73+ $ this ->define_headers ([
7474 get_string ('name ' , 'tool_trigger ' ),
7575 get_string ('description ' , 'tool_trigger ' ),
7676 get_string ('event ' , 'tool_trigger ' ),
@@ -80,7 +80,7 @@ public function __construct($uniqueid, \moodle_url $url, $perpage = 100) {
8080 get_string ('lasttriggered ' , 'tool_trigger ' ),
8181 get_string ('triggerhistory ' , 'tool_trigger ' ),
8282 get_string ('manage ' , 'tool_trigger ' ),
83- )
83+ ]
8484 );
8585 $ this ->pagesize = $ perpage ;
8686 $ systemcontext = \context_system::instance ();
@@ -101,7 +101,7 @@ public function __construct($uniqueid, \moodle_url $url, $perpage = 100) {
101101 public function col_name (\tool_trigger \workflow $ workflow ) {
102102 global $ OUTPUT ;
103103
104- $ editurl = new \moodle_url ('/admin/tool/trigger/edit.php ' , array ( 'workflowid ' => $ workflow ->id ) );
104+ $ editurl = new \moodle_url ('/admin/tool/trigger/edit.php ' , [ 'workflowid ' => $ workflow ->id ] );
105105 return \html_writer::link ($ editurl , $ workflow ->get_name ($ this ->context ));
106106 }
107107
@@ -142,7 +142,7 @@ public function col_eventname(\tool_trigger\workflow $workflow) {
142142 }
143143
144144 public function col_triggerhistory (\tool_trigger \workflow $ workflow ) {
145- $ url = new \moodle_url ('/admin/tool/trigger/history.php ' , array ( 'workflow ' => $ workflow ->id ) );
145+ $ url = new \moodle_url ('/admin/tool/trigger/history.php ' , [ 'workflow ' => $ workflow ->id ] );
146146 return \html_writer::link ($ url , get_string ('workflowviewhistory ' , 'tool_trigger ' ));
147147 }
148148
@@ -157,25 +157,25 @@ public function col_manage(\tool_trigger\workflow $workflow) {
157157
158158 $ manage = '' ;
159159
160- $ editurl = new \moodle_url ('/admin/tool/trigger/edit.php ' , array ( 'workflowid ' => $ workflow ->id ) );
160+ $ editurl = new \moodle_url ('/admin/tool/trigger/edit.php ' , [ 'workflowid ' => $ workflow ->id ] );
161161 $ icon = $ OUTPUT ->render (new \pix_icon ('t/edit ' , get_string ('editrule ' , 'tool_trigger ' )));
162- $ manage .= \html_writer::link ($ editurl , $ icon , array ( 'class ' => 'action-icon ' ) );
162+ $ manage .= \html_writer::link ($ editurl , $ icon , [ 'class ' => 'action-icon ' ] );
163163
164164 // The user should always be able to copy the rule if they are able to view the page.
165165 $ copyurl = new \moodle_url ('/admin/tool/trigger/manageworkflow.php ' ,
166- array ( 'workflowid ' => $ workflow ->id , 'action ' => 'copy ' , 'sesskey ' => sesskey ()) );
166+ [ 'workflowid ' => $ workflow ->id , 'action ' => 'copy ' , 'sesskey ' => sesskey ()] );
167167 $ icon = $ OUTPUT ->render (new \pix_icon ('t/copy ' , get_string ('duplicaterule ' , 'tool_trigger ' )));
168- $ manage .= \html_writer::link ($ copyurl , $ icon , array ( 'class ' => 'action-icon ' ) );
168+ $ manage .= \html_writer::link ($ copyurl , $ icon , [ 'class ' => 'action-icon ' ] );
169169
170- $ deleteurl = new \moodle_url ('/admin/tool/trigger/manageworkflow.php ' , array ( 'workflowid ' => $ workflow ->id ,
171- 'action ' => 'delete ' , 'sesskey ' => sesskey ()) );
170+ $ deleteurl = new \moodle_url ('/admin/tool/trigger/manageworkflow.php ' , [ 'workflowid ' => $ workflow ->id ,
171+ 'action ' => 'delete ' , 'sesskey ' => sesskey ()] );
172172 $ icon = $ OUTPUT ->render (new \pix_icon ('t/delete ' , get_string ('deleterule ' , 'tool_trigger ' )));
173- $ manage .= \html_writer::link ($ deleteurl , $ icon , array ( 'class ' => 'action-icon ' ) );
173+ $ manage .= \html_writer::link ($ deleteurl , $ icon , [ 'class ' => 'action-icon ' ] );
174174
175- $ downloadurl = new \moodle_url ('/admin/tool/trigger/export.php ' , array ( 'workflowid ' => $ workflow ->id ,
176- 'action ' => 'download ' , 'sesskey ' => sesskey ()) );
175+ $ downloadurl = new \moodle_url ('/admin/tool/trigger/export.php ' , [ 'workflowid ' => $ workflow ->id ,
176+ 'action ' => 'download ' , 'sesskey ' => sesskey ()] );
177177 $ icon = $ OUTPUT ->render (new \pix_icon ('t/download ' , get_string ('downloadrule ' , 'tool_trigger ' )));
178- $ manage .= \html_writer::link ($ downloadurl , $ icon , array ( 'class ' => 'action-icon ' ) );
178+ $ manage .= \html_writer::link ($ downloadurl , $ icon , [ 'class ' => 'action-icon ' ] );
179179
180180 return $ manage ;
181181 }
0 commit comments