FormEditorLinkProvider
final readonly class \
Decides whether the current backend user may open a form definition in the form editor, and builds the link to it. Places outside the form module that offer to edit a form ask this service instead of checking access themselves.
It only decides whether a link is offered: the form editor checks access again when it is opened.
Internal
Table of Contents
Methods
- __construct() : mixed
- canEdit() : bool
- getEditUri() : UriInterface|null
- Returns null if the current backend user may not edit the form.
Methods
__construct()
public
__construct(UriBuilder $uriBuilder, ModuleProvider $moduleProvider, FormPersistenceManagerInterface $formPersistenceManager, PersistenceConfigurationService $persistenceConfigurationService) : mixed
Parameters
- $uriBuilder : UriBuilder
- $moduleProvider : ModuleProvider
- $formPersistenceManager : FormPersistenceManagerInterface
- $persistenceConfigurationService : PersistenceConfigurationService
canEdit()
public
canEdit(string $persistenceIdentifier) : bool
Parameters
- $persistenceIdentifier : string
Return values
boolgetEditUri()
Returns null if the current backend user may not edit the form.
public
getEditUri(string $persistenceIdentifier[, string $returnUrl = '' ]) : UriInterface|null
Parameters
- $persistenceIdentifier : string
- $returnUrl : string = ''