Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Classes/AvailablePermissionSets.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@
namespace B13\PermissionSets;

use TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems;
use TYPO3\CMS\Core\DataHandling\ItemProcessingService;

/**
* Functionality to load all available permission sets for selection of be_groups.permissions.sets
* Functionality to load all available permission sets for selection of be_groups.permissions_sets
*/
class AvailablePermissionSets
{
public function __construct(protected PermissionSetRegistry $registry) {}

public function backendGroupSelector(array &$params, TcaSelectItems $parentObject)
{
public function backendGroupSelector(
array &$params,
TcaSelectItems|ItemProcessingService $parentObject
): void {
foreach ($this->registry->all() as $identifier => $permissionSet) {
$params['items'][] = ['label' => $permissionSet->label, 'value' => $identifier];
$params['items'][] = [
'label' => $permissionSet->label,
'value' => $identifier,
];
}
}
}