Skip to content

Instantly share code, notes, and snippets.

@sorenmalling
Created December 5, 2025 12:29
Show Gist options
  • Select an option

  • Save sorenmalling/42fcb4ab2d1a4c10756f2291e0259234 to your computer and use it in GitHub Desktop.

Select an option

Save sorenmalling/42fcb4ab2d1a4c10756f2291e0259234 to your computer and use it in GitHub Desktop.
src/extensions/basisweb_core/Classes/Backend/ContextMenu/PageProvider.php
<?php
namespace BasisWeb\Core\Backend\ContextMenu;
use TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider as DefaultPageProvider;
final class PageProvider extends DefaultPageProvider
{
protected $itemsConfiguration = [
'view' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.view',
'iconIdentifier' => 'actions-view-page',
'callbackAction' => 'viewRecord',
],
'edit' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.edit',
'iconIdentifier' => 'actions-page-open',
'callbackAction' => 'editRecord',
],
'new' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.newSubpage',
'iconIdentifier' => 'actions-page-new',
'callbackAction' => 'newRecord',
],
'divider1' => [
'type' => 'divider',
],
'showInMenus' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_showInMenus',
'iconIdentifier' => 'actions-view',
'callbackAction' => 'showInMenus',
],
'hideInMenus' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_hideInMenus',
'iconIdentifier' => 'actions-ban',
'callbackAction' => 'hideInMenus',
],
'enable' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:enable',
'iconIdentifier' => 'actions-edit-unhide',
'callbackAction' => 'enableRecord',
],
'disable' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:disable',
'iconIdentifier' => 'actions-edit-hide',
'callbackAction' => 'disableRecord',
],
'divider2' => [
'type' => 'divider',
],
'delete' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete',
'iconIdentifier' => 'actions-edit-delete',
'callbackAction' => 'deleteRecord',
]
];
public function getPriority(): int
{
return 100;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment