‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Controller\NewRecordController Class Reference

Public Member Functions

 __construct (IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory)
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
 newPageAction (ServerRequestInterface $request)
 

Public Attributes

int $id
 

Protected Member Functions

 init (ServerRequestInterface $request)
 
 getButtons (bool $createPage=false)
 
 doPageRecordsExistInSystem ()
 
 renderNewRecordControls ()
 
int sortTableRows (string $a, string $b)
 
string renderLink (string $linkText, string $table, int $pid)
 
 renderPageSelectPositionLink ()
 
 renderNewContentElementWizardLink ()
 
bool isTableAllowedOnPage (string $table, array $page)
 
bool isRecordCreationAllowedForTable (string $table, array $allowedNewTables=[], array $deniedNewTables=[])
 
 initializeView (string $templateName)
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUserAuthentication ()
 

Protected Attributes

array $pageinfo = array( )
 
array $pidInfo = array( )
 
array $newRecordSortList
 
bool $newPagesInto = false
 
bool $newContentInto = false
 
bool $newPagesAfter = false
 
bool $newPagesSelectPosition = true
 
array $allowedNewTables
 
array $deniedNewTables
 
string $returnUrl
 
string $perms_clause
 
string $content
 
array $tRows = array( )
 
ModuleTemplate $moduleTemplate
 
StandaloneView $view
 
PageRenderer $pageRenderer
 
IconFactory $iconFactory
 
UriBuilder $uriBuilder
 
ModuleTemplateFactory $moduleTemplateFactory
 

Detailed Description

Script class for 'db_new' and 'db_new_pages'

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

Definition at line 51 of file NewRecordController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ doPageRecordsExistInSystem()

TYPO3\CMS\Backend\Controller\NewRecordController::doPageRecordsExistInSystem ( )
protected

◆ getBackendUserAuthentication()

◆ getButtons()

◆ getLanguageService()

◆ init()

◆ initializeView()

TYPO3\CMS\Backend\Controller\NewRecordController::initializeView ( string  $templateName)
protected

Initializes the view by setting the templateName

Parameters
string$templateName

Definition at line 693 of file NewRecordController.php.

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\mainAction(), and TYPO3\CMS\Backend\Controller\NewRecordController\newPageAction().

◆ 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 663 of file NewRecordController.php.

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

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Backend\Controller\NewRecordController\init(), TYPO3\CMS\Backend\Controller\NewRecordController\newPageAction(), and TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls().

◆ 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 630 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\renderNewRecordControls().

◆ 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 142 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\getBackendUserAuthentication(), TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Backend\Controller\NewRecordController\init(), TYPO3\CMS\Backend\Controller\NewRecordController\initializeView(), and TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls().

◆ newPageAction()

◆ renderLink()

string TYPO3\CMS\Backend\Controller\NewRecordController::renderLink ( string  $linkText,
string  $table,
int  $pid 
)
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)
Returns
‪string The link.

Definition at line 566 of file NewRecordController.php.

References TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ renderNewContentElementWizardLink()

TYPO3\CMS\Backend\Controller\NewRecordController::renderNewContentElementWizardLink ( )
protected

◆ renderNewRecordControls()

◆ renderPageSelectPositionLink()

TYPO3\CMS\Backend\Controller\NewRecordController::renderPageSelectPositionLink ( )
protected

◆ 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 535 of file NewRecordController.php.

Member Data Documentation

◆ $allowedNewTables

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

◆ $content

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

Accumulated HTML output

Definition at line 102 of file NewRecordController.php.

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

◆ $deniedNewTables

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

◆ $iconFactory

IconFactory TYPO3\CMS\Backend\Controller\NewRecordController::$iconFactory
protected

◆ $id

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

Definition at line 88 of file NewRecordController.php.

◆ $moduleTemplate

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

ModuleTemplate object

Definition at line 112 of file NewRecordController.php.

◆ $moduleTemplateFactory

ModuleTemplateFactory TYPO3\CMS\Backend\Controller\NewRecordController::$moduleTemplateFactory
protected

◆ $newContentInto

bool TYPO3\CMS\Backend\Controller\NewRecordController::$newContentInto = false
protected

Definition at line 66 of file NewRecordController.php.

◆ $newPagesAfter

bool TYPO3\CMS\Backend\Controller\NewRecordController::$newPagesAfter = false
protected

Definition at line 67 of file NewRecordController.php.

◆ $newPagesInto

bool TYPO3\CMS\Backend\Controller\NewRecordController::$newPagesInto = false
protected

Definition at line 65 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 73 of file NewRecordController.php.

◆ $newRecordSortList

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

Definition at line 63 of file NewRecordController.php.

◆ $pageinfo

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

Definition at line 55 of file NewRecordController.php.

◆ $pageRenderer

PageRenderer TYPO3\CMS\Backend\Controller\NewRecordController::$pageRenderer
protected

◆ $perms_clause

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

Definition at line 96 of file NewRecordController.php.

◆ $pidInfo

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

Definition at line 59 of file NewRecordController.php.

◆ $returnUrl

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

Definition at line 92 of file NewRecordController.php.

◆ $tRows

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

Definition at line 106 of file NewRecordController.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\Controller\NewRecordController::$uriBuilder
protected

◆ $view

StandaloneView TYPO3\CMS\Backend\Controller\NewRecordController::$view
protected

Definition at line 116 of file NewRecordController.php.