class PageEditService implements PageEditServiceInterface

Main services related to PageEdit

Properties

private AuthorizationCheckerInterface $authChecker Stores AuthorizationCheckerInterface
private ConfigServiceInterface $configService Stores ConfigServiceInterface
private PageEditFormFactoryInterface $pageEditFormFactory Stores PageEditFormFactoryInterface
private PageEditFileInterface $pageEditFile Stores PageEditFileInterface
private PageEditSlugInterface $pageEditSlug Stores PageEditSlugInterface
private Request $request Stores current Request
private Environment $environment Stores Environment
private TranslatorInterface $translator Stores TranslatorInterface

Methods

__construct(AuthorizationCheckerInterface $authChecker, ConfigServiceInterface $configService, PageEditFormFactoryInterface $pageEditFormFactory, PageEditFileInterface $pageEditFile, PageEditSlugInterface $pageEditSlug, RequestStack $requestStack, Environment $environment, TranslatorInterface $translator)

No description

cloneObject(PageEdit $pageEdit)

Clones the object

Form
createForm(string $name, PageEdit $pageEdit)

Shortcut to call EventFormFactory to create Form

array
definePagesSlugTitle(Finder $finder)

Defines slug and title for a set of pages

string
defineToolbar(string $kind, string $page)

Defines the toolbar

delete(string $page, bool $archive)

Shortcut for $pageEditFile->delete()

getChangeFrequency(string $fileContent)

Gets the change frequency of the page

string
getContent(string $fileContent)

Get content of the page

PageEdit|false
getData(string $page)

Returns a PageEdit object

string|null
getDescription(string $fileContent)

Gets the description of the page

array
getLinks()

Gets links to display in the select in Tinymce

array
getPages()

Returns an array containing all the pages

int/null
getPriority(string $fileContent)

Gets the priority of the page

string
getTitle(string $fileContent, string $slug)

Gets the title of the page

string
getTitleTranslated(string $title)

Gets the translation of title of the page

string
register(string $page, Form $form, $user)

Registers the page and returns the slug

Details

at line 82
__construct(AuthorizationCheckerInterface $authChecker, ConfigServiceInterface $configService, PageEditFormFactoryInterface $pageEditFormFactory, PageEditFileInterface $pageEditFile, PageEditSlugInterface $pageEditSlug, RequestStack $requestStack, Environment $environment, TranslatorInterface $translator)

Parameters

AuthorizationCheckerInterface $authChecker
ConfigServiceInterface $configService
PageEditFormFactoryInterface $pageEditFormFactory
PageEditFileInterface $pageEditFile
PageEditSlugInterface $pageEditSlug
RequestStack $requestStack
Environment $environment
TranslatorInterface $translator

at line 106
PageEdit cloneObject(PageEdit $pageEdit)

Clones the object

Parameters

PageEdit $pageEdit

Return Value

PageEdit

at line 117
Form createForm(string $name, PageEdit $pageEdit)

Shortcut to call EventFormFactory to create Form

Parameters

string $name
PageEdit $pageEdit

Return Value

Form

at line 125
array definePagesSlugTitle(Finder $finder)

Defines slug and title for a set of pages

Parameters

Finder $finder

Return Value

array

at line 157
string defineToolbar(string $kind, string $page)

Defines the toolbar

Parameters

string $kind
string $page

Return Value

string

at line 178
delete(string $page, bool $archive)

Shortcut for $pageEditFile->delete()

Parameters

string $page
bool $archive

at line 186
getChangeFrequency(string $fileContent)

Gets the change frequency of the page

Parameters

string $fileContent

at line 201
string getContent(string $fileContent)

Get content of the page

Parameters

string $fileContent

Return Value

string

at line 219
PageEdit|false getData(string $page)

Returns a PageEdit object

Parameters

string $page

Return Value

PageEdit|false

at line 251
string|null getDescription(string $fileContent)

Gets the description of the page

Parameters

string $fileContent

Return Value

string|null

Gets links to display in the select in Tinymce

Return Value

array

at line 302
array getPages()

Returns an array containing all the pages

Return Value

array

at line 312
int/null getPriority(string $fileContent)

Gets the priority of the page

Parameters

string $fileContent

Return Value

int/null

at line 327
string getTitle(string $fileContent, string $slug)

Gets the title of the page

Parameters

string $fileContent
string $slug

Return Value

string

at line 351
string getTitleTranslated(string $title)

Gets the translation of title of the page

Parameters

string $title

Return Value

string

at line 371
string register(string $page, Form $form, $user)

Registers the page and returns the slug

Parameters

string $page
Form $form
$user

Return Value

string