@@ -83,30 +83,27 @@ public static function htmlEncode(string $value): string
83
83
*
84
84
* Ergänzt den Backend-Menüpunkt um einen Plus-Button. Dies aber nur dann,
85
85
* wenn die Instanz nicht via Redaxo-Konsole aufgerufen wurde.
86
- * (Prüfung zeitverzögert im EP, da die Konsole während der boot.php noch
87
- * nicht initialisiert ist).
86
+ * Der EP bietet sich an, da er bei Konsolen-Aufrufen nicht durchlaufen wird.
88
87
*
89
88
* @api
90
89
* @param rex_extension_point<array<string,rex_be_page>> $ep
91
90
*/
92
91
public static function epPagesPrepared (rex_extension_point $ ep ): void
93
92
{
94
- if (null === rex::getConsole ()) {
95
- $ _csrf_key = Entry::table ()->getCSRFKey ();
93
+ $ _csrf_key = Entry::table ()->getCSRFKey ();
96
94
97
- $ params = rex_csrf_token::factory ($ _csrf_key )->getUrlParams ();
95
+ $ params = rex_csrf_token::factory ($ _csrf_key )->getUrlParams ();
98
96
99
- $ params ['table_name ' ] = Entry::table ()->getTableName (); // Tabellenname anpassen
100
- $ params ['rex_yform_manager_popup ' ] = '0 ' ;
101
- $ params ['func ' ] = 'add ' ;
97
+ $ params ['table_name ' ] = Entry::table ()->getTableName (); // Tabellenname anpassen
98
+ $ params ['rex_yform_manager_popup ' ] = '0 ' ;
99
+ $ params ['func ' ] = 'add ' ;
102
100
103
- $ href = rex_url::backendPage ('neues/entry ' , $ params );
101
+ $ href = rex_url::backendPage ('neues/entry ' , $ params );
104
102
105
- $ neues = rex_be_controller::getPageObject ('neues ' );
106
- $ neues ->setTitle (
107
- $ neues ->getTitle () .
108
- ' <a class="label label-primary tex-primary" style="position: absolute; right: 18px; top: 10px; padding: 0.2em 0.6em 0.3em; border-radius: 3px; color: white; display: inline; width: auto;" href=" ' . $ href . '">+</a> ' ,
109
- );
110
- }
103
+ $ neues = rex_be_controller::getPageObject ('neues ' );
104
+ $ neues ->setTitle (
105
+ $ neues ->getTitle () .
106
+ ' <a class="label label-primary tex-primary" style="position: absolute; right: 18px; top: 10px; padding: 0.2em 0.6em 0.3em; border-radius: 3px; color: white; display: inline; width: auto;" href=" ' . $ href . '">+</a> ' ,
107
+ );
111
108
}
112
109
}
0 commit comments