Skip to content

Commit

Permalink
Aufruf Neues::epPagesPrepared
Browse files Browse the repository at this point in the history
  • Loading branch information
christophboecker authored Sep 17, 2024
1 parent 5e20309 commit 752a8b1
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
use rex_addon;
use rex_api_function;
use rex_cronjob_manager;
use rex_csrf_token;
use rex_extension;
use rex_plugin;
use rex_url;
use rex_yform_manager_dataset;

use function count;

/**
* Tabellen in YForm mit eigener Model-Class.
*/
Expand Down Expand Up @@ -53,33 +49,13 @@
}

if (rex::isBackend()) {
$addon = rex_addon::get('neues');
$pages = $addon->getProperty('pages');

/**
* Individualiserte Liste für Enries.
*/
rex_extension::register('YFORM_DATA_LIST', Entry::epYformDataList(...));

/**
* Plus(Add)-Button im Hauptmenü-Punkt des Addon bereitstellen.
*
* RexStan: Using $_REQUEST is forbidden, use rex_request::request() or rex_request() instead.
* Kommentar: Für diese Nutzung ist keine rex-Alternative verfügbar
* @phpstan-ignore-next-line
*/
if (0 < count($_REQUEST)) {
$_csrf_key = Entry::table()->getCSRFKey();

$params = rex_csrf_token::factory($_csrf_key)->getUrlParams();

$params['table_name'] = Entry::table()->getTableName(); // Tabellenname anpassen
$params['rex_yform_manager_popup'] = '0';
$params['func'] = 'add';

$href = rex_url::backendPage('neues/entry', $params);

$pages['neues']['title'] .= ' <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>';
$addon->setProperty('pages', $pages);
}
rex_extension::register('PAGES_PREPARED', Neues::epPagesPrepared(...));
}

0 comments on commit 752a8b1

Please sign in to comment.