PagePermissionAssembler

Class to determine and set proper permissions to a new (or copied) page.

The following order applies:

  • defaultPermissions as defined in this class.
  • TYPO3_CONF_VARS[BE][defaultPermissions]
  • Page TSconfig va TCEMAIN.permissions
Internal

Implements a DataHandler detail. Should only be used by the TYPO3 Core.

Table of Contents

Methods

applyDefaults()  : array<string|int, mixed>
Set default permissions of a new page, considering defaults and pageTsConfig overrides.
assemblePermissions()  : int
Calculates the bit value of the permissions given in a string, comma-separated.
setTSconfigPermissions()  : array<string|int, mixed>
Setting up perms_* fields in $fieldArray based on TSconfig input Used for new pages and pages that are copied.

Methods

applyDefaults()

Set default permissions of a new page, considering defaults and pageTsConfig overrides.

public applyDefaults(array<string|int, mixed> $fieldArray, int $pid, int $backendUserId, int $backendUserGroupId) : array<string|int, mixed>
Parameters
$fieldArray : array<string|int, mixed>

the field array to be used

$pid : int

the parent page ID

$backendUserId : int

the owner of the page to be set

$backendUserGroupId : int

the owner group of the page to be set

Return values
array<string|int, mixed>

the enriched field array

assemblePermissions()

Calculates the bit value of the permissions given in a string, comma-separated.

protected assemblePermissions(int|string $listOfPermissions) : int

Even though not documented, it seems to be possible having int values in $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPermissions']['...'] as bit mask already. To not break anything, this is kept for now.

Parameters
$listOfPermissions : int|string
Return values
int

setTSconfigPermissions()

Setting up perms_* fields in $fieldArray based on TSconfig input Used for new pages and pages that are copied.

protected setTSconfigPermissions(array<string|int, mixed> $fieldArray, array<string|int, mixed> $tsconfig) : array<string|int, mixed>
Parameters
$fieldArray : array<string|int, mixed>

Field Array, returned with modifications

$tsconfig : array<string|int, mixed>

TSconfig properties

Return values
array<string|int, mixed>

Modified Field Array


        
On this page

Search results