TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
NewRecordController Class Reference
Inheritance diagram for NewRecordController:
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(), array $deniedNewTables=array())
 
- Public Member Functions inherited from 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 AbstractModule
 $moduleTemplate
 
 $request
 

Detailed Description

Script class for 'db_new'

Definition at line 34 of file NewRecordController.php.

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

checkIfLanguagesExist ( )
protected

Checks if sys_language records are present

Returns
bool

Definition at line 731 of file NewRecordController.php.

References NewRecordController\getDatabaseConnection().

Referenced by NewRecordController\regularNew().

getBackendUserAuthentication ( )
protected
getButtons ( )
protected
getDatabaseConnection ( )
protected

Returns the database connection

Returns
DatabaseConnection

Definition at line 765 of file NewRecordController.php.

References $GLOBALS.

Referenced by NewRecordController\checkIfLanguagesExist(), and NewRecordController\init().

getLanguageService ( )
protected

Return language service instance

Returns

Definition at line 745 of file NewRecordController.php.

References $GLOBALS.

Referenced by NewRecordController\__construct(), NewRecordController\getButtons(), NewRecordController\init(), and NewRecordController\regularNew().

init ( )
protected
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 673 of file NewRecordController.php.

References $GLOBALS, NewRecordController\getBackendUserAuthentication(), and GeneralUtility\inList().

Referenced by NewRecordController\regularNew().

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

References NewRecordController\$returnUrl, $url, and elseif.

Referenced by NewRecordController\regularNew().

main ( )
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 $response, MessageInterface\getBody(), and NewRecordController\main().

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

References NewRecordController\$content, and GeneralUtility\logDeprecatedFunction().

regularNew ( )
showNewRecLink (   $table,
array  $allowedNewTables = array(),
array  $deniedNewTables = array() 
)

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

References NewRecordController\$allowedNewTables, NewRecordController\$deniedNewTables, and NewRecordController\getBackendUserAuthentication().

Referenced by NewRecordController\getButtons(), NewRecordController\main(), and NewRecordController\regularNew().

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

References elseif.

Member Data Documentation

$allowedNewTables

Definition at line 81 of file NewRecordController.php.

Referenced by NewRecordController\showNewRecLink().

$allowedNewTables_pid

Definition at line 96 of file NewRecordController.php.

$code

Definition at line 106 of file NewRecordController.php.

$content

Definition at line 140 of file NewRecordController.php.

Referenced by NewRecordController\printContent().

$deniedNewTables

Definition at line 86 of file NewRecordController.php.

Referenced by NewRecordController\showNewRecLink().

$deniedNewTables_pid

Definition at line 101 of file NewRecordController.php.

$id

Definition at line 116 of file NewRecordController.php.

Referenced by NewRecordController\regularNew().

$newContentInto

Definition at line 59 of file NewRecordController.php.

$newPagesAfter

Definition at line 64 of file NewRecordController.php.

$newPagesInto

Definition at line 54 of file NewRecordController.php.

$newPagesSelectPosition = true
protected

Definition at line 71 of file NewRecordController.php.

$newRecordSortList
protected

Definition at line 49 of file NewRecordController.php.

$pageinfo

Definition at line 39 of file NewRecordController.php.

$pagesOnly

Definition at line 128 of file NewRecordController.php.

$perms_clause

Definition at line 133 of file NewRecordController.php.

$pidInfo

Definition at line 44 of file NewRecordController.php.

$R_URI

Definition at line 111 of file NewRecordController.php.

$returnUrl

Definition at line 121 of file NewRecordController.php.

Referenced by NewRecordController\linkWrap().

$tRows

Definition at line 145 of file NewRecordController.php.

$web_list_modTSconfig

Definition at line 76 of file NewRecordController.php.

$web_list_modTSconfig_pid

Definition at line 91 of file NewRecordController.php.