6
6
use rex_addon ;
7
7
use rex_article ;
8
8
use rex_article_cache ;
9
+ use rex_article_revision ;
9
10
use rex_be_controller ;
10
11
use rex_content_service ;
11
12
use rex_csrf_token ;
30
31
class Backend
31
32
{
32
33
/**
33
- * In rex_article_cache::delete($articleId, $clang);
34
-
35
- // Create success message with hidden new slice ID embedded in the message
36
- $successMessage = rex_i18n::msg('bloecks_slice_inserted') .
37
- '<span style="display: none;" data-bloecks-new-slice-id="' . $newSliceId . '"></span>';
38
- $msg = rex_view::success($successMessage);ze the backend functionality.
34
+ * In rex_article_cache::delete($articleId, $clang);.
35
+ *
36
+ * // Create success message with hidden new slice ID embedded in the message
37
+ * $successMessage = rex_i18n::msg('bloecks_slice_inserted') .
38
+ * '<span style="display: none;" data-bloecks-new-slice-id="' . $newSliceId . '"></span>';
39
+ * $msg = rex_view::success($successMessage);ze the backend functionality.
39
40
*/
40
41
public static function init (): void
41
42
{
@@ -132,7 +133,7 @@ public static function addButtons(rex_extension_point $ep): array
132
133
// Get revision from Version plugin if available
133
134
$ revision = 0 ; // Default revision (LIVE)
134
135
if (class_exists ('rex_article_revision ' )) {
135
- $ revision = \ rex_article_revision::getSessionArticleRevision ($ articleId );
136
+ $ revision = rex_article_revision::getSessionArticleRevision ($ articleId );
136
137
}
137
138
138
139
// Get category_id for proper URL construction
@@ -266,7 +267,7 @@ public static function addPasteToModuleSelect(rex_extension_point $ep): string
266
267
// Get revision from Version plugin if available
267
268
$ revision = 0 ; // Default revision (LIVE)
268
269
if (class_exists ('rex_article_revision ' )) {
269
- $ revision = \ rex_article_revision::getSessionArticleRevision ($ articleId );
270
+ $ revision = rex_article_revision::getSessionArticleRevision ($ articleId );
270
271
}
271
272
272
273
// Check if there are already slices in this ctype - if yes, don't show button
@@ -302,10 +303,10 @@ public static function addPasteToModuleSelect(rex_extension_point $ep): string
302
303
303
304
// Add paste button before module selection
304
305
$ sourceInfo = $ clipboard ['source_info ' ] ?? null ;
305
-
306
+
306
307
// Bestimme den Modulnamen für den Button-Text
307
308
$ moduleName = '' ;
308
-
309
+
309
310
if ($ sourceInfo && !empty ($ sourceInfo ['module_name ' ])) {
310
311
// Verwende module_name aus source_info wenn verfügbar
311
312
$ moduleName = $ sourceInfo ['module_name ' ];
@@ -325,14 +326,14 @@ public static function addPasteToModuleSelect(rex_extension_point $ep): string
325
326
}
326
327
$ tooltipText = rex_i18n::msg ('bloecks_paste_from_clipboard ' );
327
328
}
328
-
329
+
329
330
// Button-Text mit REDAXO-Sprachsystem (Parameter wird automatisch in {0} eingesetzt)
330
331
if (!empty ($ moduleName )) {
331
332
$ buttonText = rex_i18n::msg ('bloecks_paste_module ' , $ moduleName );
332
333
} else {
333
334
$ buttonText = rex_i18n::msg ('bloecks_action_paste ' );
334
335
}
335
-
336
+
336
337
// Tooltip - sollte immer "Fügt ein: ..." sein, nicht "Kopiert: ..."
337
338
if (!empty ($ moduleName )) {
338
339
$ tooltipText = sprintf ('Fügt ein: "%s" ' , $ moduleName );
@@ -483,7 +484,7 @@ public static function process(rex_extension_point $ep): void
483
484
// Get revision from Version plugin if available
484
485
$ revision = 0 ; // Default revision (LIVE)
485
486
if (class_exists ('rex_article_revision ' )) {
486
- $ revision = \ rex_article_revision::getSessionArticleRevision ($ articleId );
487
+ $ revision = rex_article_revision::getSessionArticleRevision ($ articleId );
487
488
}
488
489
489
490
if ($ targetSlice ) {
0 commit comments