‪TYPO3CMS  10.4
TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider Class Reference
Inheritance diagram for TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider:
TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider TYPO3\CMS\Backend\ContextMenu\ItemProviders\ProviderInterface TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider TYPO3\CMS\Beuser\ContextMenu\ItemProvider

Public Member Functions

bool canHandle ()
 
int getPriority ()
 
array addItems (array $items)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
 __construct (string $table, string $identifier, string $context='')
 

Protected Member Functions

 initialize ()
 
bool canRender (string $itemName, string $type)
 
 initPermissions ()
 
bool hasPagePermission (int $permission)
 
array getAdditionalAttributes (string $itemName)
 
array getViewAdditionalAttributes ()
 
array getEnableDisableAdditionalAttributes ()
 
array getPasteAdditionalAttributes (string $type)
 
array getDeleteAdditionalAttributes ()
 
int getPreviewPid ()
 
string getViewLink ()
 
bool canShowInfo ()
 
bool canShowHistory ()
 
bool canBeViewed ()
 
bool canBeEdited ()
 
bool canBeNew ()
 
bool isDeletionDisabledInTS ()
 
bool canBeDeleted ()
 
bool canBeEnabled ()
 
bool canBeDisabled ()
 
bool canOpenNewCEWizard ()
 
bool canOpenListModule ()
 
bool canBeCopied ()
 
bool canBeCut ()
 
bool canBePastedAfter ()
 
bool hasDisableColumnWithValue (int $value)
 
bool isRecordLocked ()
 
bool isDeletePlaceholder ()
 
bool isRecordInClipboard (string $mode='')
 
bool isRecordATranslation ()
 
bool isRecordCurrentBackendUser ()
 
bool parentPageCanBeViewed ()
 
string getIdentifier ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
 initClipboard ()
 
 initDisabledItems ()
 
array prepareItems (array $itemsConfiguration)
 

Protected Attributes

array $record = array( )
 
array $pageRecord = array( )
 
int $pagePermissions = 0
 
array $itemsConfiguration
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
LanguageService $languageService
 
BackendUserAuthentication $backendUser
 
TYPO3 CMS Backend Clipboard Clipboard $clipboard
 
array $itemsConfiguration = array( )
 
array $disabledItems = array( )
 
string $table = ''
 
string $identifier = ''
 
string $context = ''
 

Detailed Description

Class responsible for providing click menu items for db records which don't have custom provider (as e.g. pages)

Definition at line 32 of file RecordProvider.php.

Member Function Documentation

◆ addItems()

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::addItems ( array  $items)

This provider works as a fallback if there is no provider dedicated for certain table, thus it's only kicking in when $items are empty.

Parameters
array$items
Returns
‪array

Reimplemented from TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider.

Reimplemented in TYPO3\CMS\Beuser\ContextMenu\ItemProvider.

Definition at line 189 of file RecordProvider.php.

References TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initialize(), and TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider\prepareItems().

◆ canBeCopied()

◆ canBeCut()

◆ canBeDeleted()

◆ canBeDisabled()

◆ canBeEdited()

◆ canBeEnabled()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canBeEnabled ( )
protected

◆ canBeNew()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canBeNew ( )
protected

◆ canBePastedAfter()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canBePastedAfter ( )
protected

Paste after is only shown for records from the same table (comparing record in clipboard and record clicked)

Returns
‪bool

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 626 of file RecordProvider.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, and TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\hasPagePermission().

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canRender().

◆ canBeViewed()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canBeViewed ( )
protected

◆ canHandle()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canHandle ( )

Whether this provider should kick in

Returns
‪bool

Reimplemented from TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider.

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 154 of file RecordProvider.php.

References $GLOBALS.

◆ canOpenListModule()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canOpenListModule ( )
protected

◆ canOpenNewCEWizard()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canOpenNewCEWizard ( )
protected

◆ canRender()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canRender ( string  $itemName,
string  $type 
)
protected

◆ canShowHistory()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canShowHistory ( )
protected

Checks if the page is allowed to show info

Returns
‪bool

Definition at line 484 of file RecordProvider.php.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider\canRender(), and TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canRender().

◆ canShowInfo()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::canShowInfo ( )
protected

Checks if the page is allowed to show info

Returns
‪bool

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 474 of file RecordProvider.php.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canRender().

◆ getAdditionalAttributes()

◆ getDeleteAdditionalAttributes()

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getDeleteAdditionalAttributes ( )
protected

◆ getEnableDisableAdditionalAttributes()

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getEnableDisableAdditionalAttributes ( )
protected

◆ getIdentifier()

string TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getIdentifier ( )
protected
Returns
‪string

Reimplemented from TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider.

Definition at line 743 of file RecordProvider.php.

◆ getPasteAdditionalAttributes()

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getPasteAdditionalAttributes ( string  $type)
protected

◆ getPreviewPid()

int TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getPreviewPid ( )
protected

Returns id of the Page used for preview

Returns
‪int

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 433 of file RecordProvider.php.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getViewLink().

◆ getPriority()

int TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getPriority ( )

Priority is set to lower then default value, in order to skip this provider if there is less generic provider available.

Returns
‪int

Reimplemented from TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider.

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider, and TYPO3\CMS\Beuser\ContextMenu\ItemProvider.

Definition at line 178 of file RecordProvider.php.

◆ getViewAdditionalAttributes()

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getViewAdditionalAttributes ( )
protected

◆ getViewLink()

string TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::getViewLink ( )
protected

◆ hasDisableColumnWithValue()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::hasDisableColumnWithValue ( int  $value)
protected

Checks if table have "disable" column (e.g. "hidden"), if user has access to this column and if it contains given value

Parameters
int$value
Returns
‪bool

Definition at line 642 of file RecordProvider.php.

References $GLOBALS, and TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider\$table.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDisabled(), and TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeEnabled().

◆ hasPagePermission()

◆ initialize()

TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::initialize ( )
protected

◆ initPermissions()

TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::initPermissions ( )
protected

Saves calculated permissions for a page containing given record, to speed things up

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 267 of file RecordProvider.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initialize().

◆ isDeletePlaceholder()

◆ isDeletionDisabledInTS()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::isDeletionDisabledInTS ( )
protected

Checks if disableDelete flag is set in TSConfig for the current table

Returns
‪bool

Definition at line 539 of file RecordProvider.php.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider\canBeDeleted(), and TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDeleted().

◆ isRecordATranslation()

◆ isRecordCurrentBackendUser()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::isRecordCurrentBackendUser ( )
protected

Return true in case the current record is the current backend user

Returns
‪bool

Definition at line 714 of file RecordProvider.php.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDeleted(), and TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDisabled().

◆ isRecordInClipboard()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::isRecordInClipboard ( string  $mode = '')
protected

◆ isRecordLocked()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::isRecordLocked ( )
protected

Record is locked if page is locked or page is not locked but record is

Returns
‪bool

Reimplemented in TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider.

Definition at line 664 of file RecordProvider.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeEdited().

◆ parentPageCanBeViewed()

bool TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::parentPageCanBeViewed ( )
protected

Member Data Documentation

◆ $itemsConfiguration

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::$itemsConfiguration
protected

Definition at line 54 of file RecordProvider.php.

◆ $pagePermissions

int TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::$pagePermissions = 0
protected

Local cache for the result of BackendUserAuthentication::calcPerms()

Definition at line 50 of file RecordProvider.php.

◆ $pageRecord

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::$pageRecord = array( )
protected

Database record of the page $this->record is placed on

Definition at line 44 of file RecordProvider.php.

◆ $record

array TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider::$record = array( )
protected

Database record

Definition at line 38 of file RecordProvider.php.