Skip to content

Commit

Permalink
[BUGFIX] Use itemsProcFunc to display items for table name for reco…
Browse files Browse the repository at this point in the history
…rd crawler configuration
  • Loading branch information
thommyhh committed Apr 23, 2024
1 parent 53faffb commit 73d2d2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Classes/Tca/TableSelectItems.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);


namespace WEBcoast\VersatileCrawler\Tca;


class TableSelectItems
{
public function addTableItems(&$parameters): void
{
$items = &$parameters['items'];

foreach ($GLOBALS['TCA'] as $table => $configuration) {
if (in_array($table, ['pages', 'tt_content', 'sys_category']) || str_starts_with($table, 'tx_')) {
$items[] = [
'label' => $configuration['ctrl']['title'],
'value' => $table
];
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'tables',
'itemsProcFunc' => \WEBcoast\VersatileCrawler\Tca\TableSelectItems::class . '->addTableItems',
]
],
'record_storage_page' => [
Expand Down

0 comments on commit 73d2d2c

Please sign in to comment.