Skip to content

Commit 91fadeb

Browse files
committed
2 parents 50f1a65 + 9e6d897 commit 91fadeb

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

lib/bloecks_backend.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use rex_addon;
77
use rex_article;
88
use rex_article_cache;
9+
use rex_article_revision;
910
use rex_be_controller;
1011
use rex_content_service;
1112
use rex_csrf_token;
@@ -30,12 +31,12 @@
3031
class Backend
3132
{
3233
/**
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.
3940
*/
4041
public static function init(): void
4142
{
@@ -132,7 +133,7 @@ public static function addButtons(rex_extension_point $ep): array
132133
// Get revision from Version plugin if available
133134
$revision = 0; // Default revision (LIVE)
134135
if (class_exists('rex_article_revision')) {
135-
$revision = \rex_article_revision::getSessionArticleRevision($articleId);
136+
$revision = rex_article_revision::getSessionArticleRevision($articleId);
136137
}
137138

138139
// Get category_id for proper URL construction
@@ -266,7 +267,7 @@ public static function addPasteToModuleSelect(rex_extension_point $ep): string
266267
// Get revision from Version plugin if available
267268
$revision = 0; // Default revision (LIVE)
268269
if (class_exists('rex_article_revision')) {
269-
$revision = \rex_article_revision::getSessionArticleRevision($articleId);
270+
$revision = rex_article_revision::getSessionArticleRevision($articleId);
270271
}
271272

272273
// 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
302303

303304
// Add paste button before module selection
304305
$sourceInfo = $clipboard['source_info'] ?? null;
305-
306+
306307
// Bestimme den Modulnamen für den Button-Text
307308
$moduleName = '';
308-
309+
309310
if ($sourceInfo && !empty($sourceInfo['module_name'])) {
310311
// Verwende module_name aus source_info wenn verfügbar
311312
$moduleName = $sourceInfo['module_name'];
@@ -325,14 +326,14 @@ public static function addPasteToModuleSelect(rex_extension_point $ep): string
325326
}
326327
$tooltipText = rex_i18n::msg('bloecks_paste_from_clipboard');
327328
}
328-
329+
329330
// Button-Text mit REDAXO-Sprachsystem (Parameter wird automatisch in {0} eingesetzt)
330331
if (!empty($moduleName)) {
331332
$buttonText = rex_i18n::msg('bloecks_paste_module', $moduleName);
332333
} else {
333334
$buttonText = rex_i18n::msg('bloecks_action_paste');
334335
}
335-
336+
336337
// Tooltip - sollte immer "Fügt ein: ..." sein, nicht "Kopiert: ..."
337338
if (!empty($moduleName)) {
338339
$tooltipText = sprintf('Fügt ein: "%s"', $moduleName);
@@ -483,7 +484,7 @@ public static function process(rex_extension_point $ep): void
483484
// Get revision from Version plugin if available
484485
$revision = 0; // Default revision (LIVE)
485486
if (class_exists('rex_article_revision')) {
486-
$revision = \rex_article_revision::getSessionArticleRevision($articleId);
487+
$revision = rex_article_revision::getSessionArticleRevision($articleId);
487488
}
488489

489490
if ($targetSlice) {

0 commit comments

Comments
 (0)