@@ -38,30 +38,30 @@ public function createApplicationTabs()
3838 {
3939 $ tabs = $ this ->getTabs ();
4040 if ($ this ->hasPermission ('config/general ' )) {
41- $ tabs ->add ('general ' , array (
41+ $ tabs ->add ('general ' , [
4242 'title ' => $ this ->translate ('Adjust the general configuration of Icinga Web 2 ' ),
4343 'label ' => $ this ->translate ('General ' ),
4444 'url ' => 'config/general ' ,
4545 'baseTarget ' => '_main '
46- ) );
46+ ] );
4747 }
4848 if ($ this ->hasPermission ('config/resources ' )) {
49- $ tabs ->add ('resource ' , array (
49+ $ tabs ->add ('resource ' , [
5050 'title ' => $ this ->translate ('Configure which resources are being utilized by Icinga Web 2 ' ),
5151 'label ' => $ this ->translate ('Resources ' ),
5252 'url ' => 'config/resource ' ,
5353 'baseTarget ' => '_main '
54- ) );
54+ ] );
5555 }
5656 if ($ this ->hasPermission ('config/access-control/users ' )
5757 || $ this ->hasPermission ('config/access-control/groups ' )
5858 ) {
59- $ tabs ->add ('authentication ' , array (
59+ $ tabs ->add ('authentication ' , [
6060 'title ' => $ this ->translate ('Configure the user and group backends ' ),
6161 'label ' => $ this ->translate ('Access Control Backends ' ),
6262 'url ' => 'config/userbackend ' ,
6363 'baseTarget ' => '_main '
64- ) );
64+ ] );
6565 }
6666
6767 return $ tabs ;
@@ -125,11 +125,11 @@ public function modulesAction()
125125 // Overwrite tabs created in init
126126 // @TODO(el): This seems not natural to me. Module configuration should have its own controller.
127127 $ this ->view ->tabs = Widget::create ('tabs ' )
128- ->add ('modules ' , array (
128+ ->add ('modules ' , [
129129 'label ' => $ this ->translate ('Modules ' ),
130130 'title ' => $ this ->translate ('List intalled modules ' ),
131131 'url ' => 'config/modules '
132- ) )
132+ ] )
133133 ->activate ('modules ' );
134134 $ this ->view ->modules = Icinga::app ()->getModuleManager ()->select ()
135135 ->from ('modules ' )
@@ -418,10 +418,10 @@ public function resourceAction()
418418 public function createresourceAction ()
419419 {
420420 $ this ->assertPermission ('config/resources ' );
421- $ this ->getTabs ()->add ('resources/new ' , array (
421+ $ this ->getTabs ()->add ('resources/new ' , [
422422 'label ' => $ this ->translate ('New Resource ' ),
423423 'url ' => Url::fromRequest ()
424- ) )->activate ('resources/new ' );
424+ ] )->activate ('resources/new ' );
425425 $ form = new ResourceConfigForm ();
426426 $ form ->addDescription ($ this ->translate ('Resources are entities that provide data to Icinga Web 2. ' ));
427427 $ form ->setIniConfig (Config::app ('resources ' ));
@@ -439,10 +439,10 @@ public function createresourceAction()
439439 public function editresourceAction ()
440440 {
441441 $ this ->assertPermission ('config/resources ' );
442- $ this ->getTabs ()->add ('resources/update ' , array (
442+ $ this ->getTabs ()->add ('resources/update ' , [
443443 'label ' => $ this ->translate ('Update Resource ' ),
444444 'url ' => Url::fromRequest ()
445- ) )->activate ('resources/update ' );
445+ ] )->activate ('resources/update ' );
446446 $ form = new ResourceConfigForm ();
447447 $ form ->setIniConfig (Config::app ('resources ' ));
448448 $ form ->setRedirectUrl ('config/resource ' );
@@ -459,11 +459,11 @@ public function editresourceAction()
459459 public function removeresourceAction ()
460460 {
461461 $ this ->assertPermission ('config/resources ' );
462- $ this ->getTabs ()->add ('resources/remove ' , array (
462+ $ this ->getTabs ()->add ('resources/remove ' , [
463463 'label ' => $ this ->translate ('Remove Resource ' ),
464464 'url ' => Url::fromRequest ()
465- ) )->activate ('resources/remove ' );
466- $ form = new ConfirmRemovalForm (array (
465+ ] )->activate ('resources/remove ' );
466+ $ form = new ConfirmRemovalForm ([
467467 'onSuccess ' => function ($ form ) {
468468 $ configForm = new ResourceConfigForm ();
469469 $ configForm ->setIniConfig (Config::app ('resources ' ));
@@ -482,7 +482,7 @@ public function removeresourceAction()
482482 return false ;
483483 }
484484 }
485- ) );
485+ ] );
486486 $ form ->setRedirectUrl ('config/resource ' );
487487 $ form ->handleRequest ();
488488
0 commit comments