‪TYPO3CMS  9.5
TYPO3\CMS\Backend\Controller\NewRecordController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\NewRecordController:
TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait

Public Member Functions

 __construct ()
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
 main ()
 
 pagesOnly ()
 
 regularNew ()
 
int sortNewRecordsByConfig ($a, $b)
 
string linkWrap ($linkText, $table, $pid, $addContentTable=false)
 
bool isTableAllowedForThisPage ($pid_row, $checkTable)
 
bool showNewRecLink ($table, array $allowedNewTables=[], array $deniedNewTables=[])
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 

Public Attributes

int $id
 

Protected Member Functions

 init (ServerRequestInterface $request)
 
ResponseInterface null renderContent (ServerRequestInterface $request)
 
 getButtons ()
 
ResponseInterface null renderPositionTree ()
 
 renderNewRecordControls (ServerRequestInterface $request)
 
int sortTableRows (string $a, string $b)
 
string renderLink (string $linkText, string $table, int $pid, bool $addContentTable=false)
 
bool isTableAllowedOnPage (string $table, array $page)
 
bool isRecordCreationAllowedForTable (string $table, array $allowedNewTables=[], array $deniedNewTables=[])
 
bool checkIfLanguagesExist ()
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUserAuthentication ()
 

Protected Attributes

array $deprecatedPublicProperties
 
array $pageinfo = array( )
 
array $pidInfo = array( )
 
array $newRecordSortList
 
int $newPagesInto
 
int $newContentInto
 
int $newPagesAfter
 
bool $newPagesSelectPosition = true
 
array $web_list_modTSconfig
 
array $allowedNewTables
 
array $deniedNewTables
 
array $web_list_modTSconfig_pid
 
array $allowedNewTables_pid
 
array $deniedNewTables_pid
 
string $code
 
string $R_URI
 
string $returnUrl
 
int $pagesOnly
 
string $perms_clause
 
string $content
 
array $tRows
 
ModuleTemplate $moduleTemplate
 

Detailed Description

Script class for 'db_new'

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 45 of file NewRecordController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkIfLanguagesExist()

bool TYPO3\CMS\Backend\Controller\NewRecordController::checkIfLanguagesExist ( )
protected

Checks if sys_language records are present

Returns
‪bool

Definition at line 888 of file NewRecordController.php.

◆ getBackendUserAuthentication()

◆ getButtons()

◆ getLanguageService()

◆ init()

◆ isRecordCreationAllowedForTable()

bool TYPO3\CMS\Backend\Controller\NewRecordController::isRecordCreationAllowedForTable ( string  $table,
array  $allowedNewTables = [],
array  $deniedNewTables = [] 
)
protected

Returns whether the record link should be shown for a table

Returns TRUE if:

  • ‪$allowedNewTables and $deniedNewTables are empty
  • ‪the table is not found in $deniedNewTables and $allowedNewTables is not set or the $table tablename is found in $allowedNewTables

If $table tablename is found in $allowedNewTables and $deniedNewTables, $deniedNewTables has priority over $allowedNewTables.

Parameters
string$table‪Table name to test if in allowedTables
array$allowedNewTables‪Array of new tables that are allowed.
array$deniedNewTables‪Array of new tables that are not allowed.
Returns
‪bool Returns TRUE if a link for creating new records should be displayed for $table

Definition at line 867 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\$allowedNewTables, TYPO3\CMS\Backend\Controller\NewRecordController\$deniedNewTables, and TYPO3\CMS\Backend\Controller\NewRecordController\getBackendUserAuthentication().

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Backend\Controller\NewRecordController\renderContent(), TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls(), and TYPO3\CMS\Backend\Controller\NewRecordController\showNewRecLink().

◆ isTableAllowedForThisPage()

bool TYPO3\CMS\Backend\Controller\NewRecordController::isTableAllowedForThisPage (   $pid_row,
  $checkTable 
)

Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row

Parameters
array$pid_row‪Record for parent page.
string$checkTable‪Table name to check
Returns
‪bool Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 279 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\isTableAllowedOnPage().

◆ isTableAllowedOnPage()

bool TYPO3\CMS\Backend\Controller\NewRecordController::isTableAllowedOnPage ( string  $table,
array  $page 
)
protected

Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row

Parameters
string$table‪Table name to check
array$page‪Potential parent page
Returns
‪bool Returns TRUE if the tablename $table is allowed to be created on the $page

Definition at line 829 of file NewRecordController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\NewRecordController\getBackendUserAuthentication(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\isTableAllowedForThisPage(), and TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls().

◆ linkWrap()

string TYPO3\CMS\Backend\Controller\NewRecordController::linkWrap (   $linkText,
  $table,
  $pid,
  $addContentTable = false 
)

Links the string $code to a create-new form for a record in $table created on page $pid

Parameters
string$linkText‪Link text
string$table‪Table name (in which to create new record)
int$pid‪PID value for the "&edit['.$table.']['.$pid.']=new" command (positive/negative)
bool$addContentTable‪If $addContentTable is set, then a new tt_content record is created together with pages
Returns
‪string The link.
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 265 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\renderLink().

◆ main()

TYPO3\CMS\Backend\Controller\NewRecordController::main ( )

Main processing, creating the list of new record tables to select from

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 208 of file NewRecordController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\HttpUtility\redirect(), and TYPO3\CMS\Backend\Controller\NewRecordController\renderContent().

◆ mainAction()

ResponseInterface TYPO3\CMS\Backend\Controller\NewRecordController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

Parameters
ServerRequestInterface$request‪the current request
Returns
‪ResponseInterface the response with the content

Definition at line 192 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\renderContent().

◆ pagesOnly()

TYPO3\CMS\Backend\Controller\NewRecordController::pagesOnly ( )

◆ regularNew()

TYPO3\CMS\Backend\Controller\NewRecordController::regularNew ( )

Create a regular new element (pages and records)

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 235 of file NewRecordController.php.

References $GLOBALS, and TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls().

◆ renderContent()

◆ renderLink()

string TYPO3\CMS\Backend\Controller\NewRecordController::renderLink ( string  $linkText,
string  $table,
int  $pid,
bool  $addContentTable = false 
)
protected

Links the string $code to a create-new form for a record in $table created on page $pid

Parameters
string$linkText‪Link text
string$table‪Table name (in which to create new record)
int$pid‪PID value for the "&edit['.$table.']['.$pid.']=new" command (positive/negative)
bool$addContentTable‪If $addContentTable is set, then a new tt_content record is created together with pages
Returns
‪string The link.

Definition at line 800 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\$returnUrl.

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\linkWrap(), and TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls().

◆ renderNewRecordControls()

◆ renderPositionTree()

ResponseInterface null TYPO3\CMS\Backend\Controller\NewRecordController::renderPositionTree ( )
protected

◆ showNewRecLink()

bool TYPO3\CMS\Backend\Controller\NewRecordController::showNewRecLink (   $table,
array  $allowedNewTables = [],
array  $deniedNewTables = [] 
)

Returns TRUE if:

  • ‪$allowedNewTables and $deniedNewTables are empty
  • ‪the table is not found in $deniedNewTables and $allowedNewTables is not set or the $table tablename is found in $allowedNewTables

If $table tablename is found in $allowedNewTables and $deniedNewTables, $deniedNewTables has priority over $allowedNewTables.

Parameters
string$table‪Table name to test if in allowedTables
array$allowedNewTables‪Array of new tables that are allowed.
array$deniedNewTables‪Array of new tables that are not allowed.
Returns
‪bool Returns TRUE if a link for creating new records should be displayed for $table
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 300 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\$allowedNewTables, TYPO3\CMS\Backend\Controller\NewRecordController\$deniedNewTables, and TYPO3\CMS\Backend\Controller\NewRecordController\isRecordCreationAllowedForTable().

◆ sortNewRecordsByConfig()

int TYPO3\CMS\Backend\Controller\NewRecordController::sortNewRecordsByConfig (   $a,
  $b 
)

User array sort function used by renderNewRecordControls

Parameters
string$a‪First array element for compare
string$b‪First array element for compare
Returns
‪int -1 for lower, 0 for equal, 1 for greater
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 249 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\sortTableRows().

◆ sortTableRows()

int TYPO3\CMS\Backend\Controller\NewRecordController::sortTableRows ( string  $a,
string  $b 
)
protected

User array sort function used by renderNewRecordControls

Parameters
string$a‪First array element for compare
string$b‪First array element for compare
Returns
‪int -1 for lower, 0 for equal, 1 for greater

Definition at line 768 of file NewRecordController.php.

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\sortNewRecordsByConfig().

Member Data Documentation

◆ $allowedNewTables

array TYPO3\CMS\Backend\Controller\NewRecordController::$allowedNewTables
protected

◆ $allowedNewTables_pid

array TYPO3\CMS\Backend\Controller\NewRecordController::$allowedNewTables_pid
protected

Definition at line 119 of file NewRecordController.php.

◆ $code

string TYPO3\CMS\Backend\Controller\NewRecordController::$code
protected

Definition at line 127 of file NewRecordController.php.

◆ $content

string TYPO3\CMS\Backend\Controller\NewRecordController::$content
protected

Accumulated HTML output

Definition at line 158 of file NewRecordController.php.

◆ $deniedNewTables

array TYPO3\CMS\Backend\Controller\NewRecordController::$deniedNewTables
protected

◆ $deniedNewTables_pid

array TYPO3\CMS\Backend\Controller\NewRecordController::$deniedNewTables_pid
protected

Definition at line 123 of file NewRecordController.php.

◆ $deprecatedPublicProperties

array TYPO3\CMS\Backend\Controller\NewRecordController::$deprecatedPublicProperties
protected
Initial value:
= array(
'pageinfo' => 'Using $pageinfo of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'pidInfo' => 'Using $pidInfo of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'newPagesInto' => 'Using $newPagesInto of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'newContentInto' => 'Using $newContentInto of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'newPagesAfter' => 'Using $newPagesAfter of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'web_list_modTSconfig' => 'Using $web_list_modTSconfig of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'allowedNewTables' => 'Using $allowedNewTables of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'deniedNewTables' => 'Using $deniedNewTables of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'web_list_modTSconfig_pid' => 'Using $web_list_modTSconfig_pid of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'allowedNewTables_pid' => 'Using $allowedNewTables_pid of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'deniedNewTables_pid' => 'Using $deniedNewTables_pid of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'code' => 'Using $code of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'R_URI' => 'Using $R_URI of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'returnUrl' => 'Using $returnUrl of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'pagesOnly' => 'Using $pagesOnly of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'perms_clause' => 'Using $perms_clause of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'content' => 'Using $content of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
'tRows' => 'Using $tRows of class NewRecordController from outside is discouraged as this variable is only used for internal storage.',
)

Definition at line 50 of file NewRecordController.php.

◆ $id

int TYPO3\CMS\Backend\Controller\NewRecordController::$id
See also
‪\TYPO3\CMS\Backend\Tree\View\NewRecordPageTreeView::expandNext()

Definition at line 138 of file NewRecordController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Backend\Controller\NewRecordController::$moduleTemplate
protected

ModuleTemplate object

Definition at line 168 of file NewRecordController.php.

◆ $newContentInto

int TYPO3\CMS\Backend\Controller\NewRecordController::$newContentInto
protected

Definition at line 89 of file NewRecordController.php.

◆ $newPagesAfter

int TYPO3\CMS\Backend\Controller\NewRecordController::$newPagesAfter
protected

Definition at line 93 of file NewRecordController.php.

◆ $newPagesInto

int TYPO3\CMS\Backend\Controller\NewRecordController::$newPagesInto
protected

Definition at line 85 of file NewRecordController.php.

◆ $newPagesSelectPosition

bool TYPO3\CMS\Backend\Controller\NewRecordController::$newPagesSelectPosition = true
protected

Determines, whether "Select Position" for new page should be shown

Definition at line 99 of file NewRecordController.php.

◆ $newRecordSortList

array TYPO3\CMS\Backend\Controller\NewRecordController::$newRecordSortList
protected

Definition at line 81 of file NewRecordController.php.

◆ $pageinfo

array TYPO3\CMS\Backend\Controller\NewRecordController::$pageinfo = array( )
protected

Definition at line 73 of file NewRecordController.php.

◆ $pagesOnly

int TYPO3\CMS\Backend\Controller\NewRecordController::$pagesOnly
protected

pagesOnly flag.

Definition at line 148 of file NewRecordController.php.

◆ $perms_clause

string TYPO3\CMS\Backend\Controller\NewRecordController::$perms_clause
protected

Definition at line 152 of file NewRecordController.php.

◆ $pidInfo

array TYPO3\CMS\Backend\Controller\NewRecordController::$pidInfo = array( )
protected

Definition at line 77 of file NewRecordController.php.

◆ $R_URI

string TYPO3\CMS\Backend\Controller\NewRecordController::$R_URI
protected

Definition at line 131 of file NewRecordController.php.

◆ $returnUrl

string TYPO3\CMS\Backend\Controller\NewRecordController::$returnUrl
protected

◆ $tRows

array TYPO3\CMS\Backend\Controller\NewRecordController::$tRows
protected

Definition at line 162 of file NewRecordController.php.

◆ $web_list_modTSconfig

array TYPO3\CMS\Backend\Controller\NewRecordController::$web_list_modTSconfig
protected

Definition at line 103 of file NewRecordController.php.

◆ $web_list_modTSconfig_pid

array TYPO3\CMS\Backend\Controller\NewRecordController::$web_list_modTSconfig_pid
protected

Definition at line 115 of file NewRecordController.php.