TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Controller\NewRecordController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\NewRecordController:
TYPO3\CMS\Backend\Module\AbstractModule

Public Member Functions

 __construct ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 main ()
 
 regularNew ()
 
 sortNewRecordsByConfig ($a, $b)
 
 printContent ()
 
 linkWrap ($linkText, $table, $pid, $addContentTable=false)
 
 isTableAllowedForThisPage ($pid_row, $checkTable)
 
 showNewRecLink ($table, array $allowedNewTables=[], array $deniedNewTables=[])
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Module\AbstractModule
 __construct ()
 
 processRequest (ServerRequestInterface $request, ResponseInterface $response)
 

Public Attributes

 $pageinfo
 
 $pidInfo
 
 $newPagesInto
 
 $newContentInto
 
 $newPagesAfter
 
 $web_list_modTSconfig
 
 $allowedNewTables
 
 $deniedNewTables
 
 $web_list_modTSconfig_pid
 
 $allowedNewTables_pid
 
 $deniedNewTables_pid
 
 $code
 
 $R_URI
 
 $id
 
 $returnUrl
 
 $pagesOnly
 
 $perms_clause
 
 $content
 
 $tRows
 

Protected Member Functions

 init ()
 
 getButtons ()
 
 checkIfLanguagesExist ()
 
 getLanguageService ()
 
 getBackendUserAuthentication ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $newRecordSortList
 
 $newPagesSelectPosition = true
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Module\AbstractModule
 $moduleTemplate
 
 $request
 

Detailed Description

Script class for 'db_new'

Definition at line 34 of file NewRecordController.php.

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ checkIfLanguagesExist()

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

Checks if sys_language records are present

Returns
bool

Definition at line 730 of file NewRecordController.php.

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

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

◆ getBackendUserAuthentication()

◆ getButtons()

◆ getDatabaseConnection()

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

◆ getLanguageService()

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

◆ init()

◆ isTableAllowedForThisPage()

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_rowRecord for parent page.
string$checkTableTable name to check
Returns
bool Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row

Definition at line 672 of file NewRecordController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\NewRecordController\getBackendUserAuthentication(), and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

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

◆ linkWrap()

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$linkTextLink text
string$tableTable name (in which to create new record)
int$pidPID value for the "&edit['.$table.']['.$pid.']=new" command (positive/negative)
bool$addContentTableIf $addContentTable is set, then a new tt_content record is created together with pages
Returns
string The link.

Definition at line 645 of file NewRecordController.php.

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

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

◆ main()

◆ mainAction()

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

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$requestthe current request
ResponseInterface$response
Returns
ResponseInterface the response with the content

Definition at line 227 of file NewRecordController.php.

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

◆ printContent()

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

Ending page output and echo'ing content to browser.

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use mainAction() instead

Definition at line 630 of file NewRecordController.php.

References TYPO3\CMS\Backend\Controller\NewRecordController\$content, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ regularNew()

◆ showNewRecLink()

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$tableTable name to test if in allowedTables
array$allowedNewTablesArray of new tables that are allowed.
array$deniedNewTablesArray 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 709 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\main(), and TYPO3\CMS\Backend\Controller\NewRecordController\regularNew().

◆ sortNewRecordsByConfig()

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

User array sort function used by regularNew

Parameters
string$aFirst array element for compare
string$bFirst array element for compare
Returns
int -1 for lower, 0 for equal, 1 for greater

Definition at line 600 of file NewRecordController.php.

References $a.

Member Data Documentation

◆ $allowedNewTables

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

◆ $allowedNewTables_pid

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

Definition at line 96 of file NewRecordController.php.

◆ $code

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

Definition at line 106 of file NewRecordController.php.

◆ $content

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

◆ $deniedNewTables

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

◆ $deniedNewTables_pid

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

Definition at line 101 of file NewRecordController.php.

◆ $id

TYPO3\CMS\Backend\Controller\NewRecordController::$id

◆ $newContentInto

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

Definition at line 59 of file NewRecordController.php.

◆ $newPagesAfter

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

Definition at line 64 of file NewRecordController.php.

◆ $newPagesInto

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

Definition at line 54 of file NewRecordController.php.

◆ $newPagesSelectPosition

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

Definition at line 71 of file NewRecordController.php.

◆ $newRecordSortList

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

Definition at line 49 of file NewRecordController.php.

◆ $pageinfo

TYPO3\CMS\Backend\Controller\NewRecordController::$pageinfo

Definition at line 39 of file NewRecordController.php.

◆ $pagesOnly

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

Definition at line 128 of file NewRecordController.php.

◆ $perms_clause

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

Definition at line 133 of file NewRecordController.php.

◆ $pidInfo

TYPO3\CMS\Backend\Controller\NewRecordController::$pidInfo

Definition at line 44 of file NewRecordController.php.

◆ $R_URI

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

Definition at line 111 of file NewRecordController.php.

◆ $returnUrl

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

◆ $tRows

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

Definition at line 145 of file NewRecordController.php.

◆ $web_list_modTSconfig

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

Definition at line 76 of file NewRecordController.php.

◆ $web_list_modTSconfig_pid

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

Definition at line 91 of file NewRecordController.php.