CreateRecordDryRun
Tells what a create-record reaction would do with a payload, without writing anything.
This is a specific reaction implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Methods
- __construct() : mixed
- run() : CreateRecordDryRunResult
- Resolves the payload as the user the reaction impersonates. Its groups are fetched, since the field permissions depend on them, but it is not started: starting it writes its uc. It is made the global user for as long as the payload is resolved, as the endpoint does, since item processors read it from there, and the one who asks is restored afterwards.
- findObstacles() : array<int, DryRunObstacle>
- These are the checks DataHandler rejects a record for most often. The allowed record types of a page and the root level of a table are left to DataHandler.
- getFieldLabels() : array<string, string>
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory, LanguageServiceFactory $languageServiceFactory, Context $context) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
- $languageServiceFactory : LanguageServiceFactory
- $context : Context
run()
Resolves the payload as the user the reaction impersonates. Its groups are fetched, since the field permissions depend on them, but it is not started: starting it writes its uc. It is made the global user for as long as the payload is resolved, as the endpoint does, since item processors read it from there, and the one who asks is restored afterwards.
public
run(ReactionInstruction $reaction, CreateRecordReaction $implementation, array<string|int, mixed>|null $payload) : CreateRecordDryRunResult
A payload the endpoint would read as empty is passed as null and not resolved: every field would only be reported as skipped for it.
Parameters
- $reaction : ReactionInstruction
- $implementation : CreateRecordReaction
- $payload : array<string|int, mixed>|null
Return values
CreateRecordDryRunResultfindObstacles()
These are the checks DataHandler rejects a record for most often. The allowed record types of a page and the root level of a table are left to DataHandler.
protected
findObstacles(ReactionInstruction $reaction, BackendUserAuthentication $user) : array<int, DryRunObstacle>
Parameters
- $reaction : ReactionInstruction
- $user : BackendUserAuthentication
Return values
array<int, DryRunObstacle>getFieldLabels()
protected
getFieldLabels(CreateRecordResolution $resolution) : array<string, string>
Parameters
- $resolution : CreateRecordResolution