PetitionController
extends AbstractController
in package
Uses
LotgdControllerTrait
Table of Contents
- TRANSLATION_DOMAIN = 'jaxon_petition'
- $dispatcher : mixed
- $petitionsRepository : mixed
- $settings : mixed
- $translator : mixed
- __construct() : mixed
- faq() : Response
- help() : Response
- primer() : Response
- report() : Response
- addNotification() : never
- Adds a notification to the current session for type.
- renderBlock() : Response
- Renders a view block.
- emailPetitionAdmin() : void
- If the admin wants it, email the petitions to them.
- faqToc() : array<string|int, mixed>
- Creaqte list of faqs.
- getParams() : array<string|int, mixed>
- Get default params.
- proccessForm() : void
Constants
TRANSLATION_DOMAIN
public
mixed
TRANSLATION_DOMAIN
= 'jaxon_petition'
Properties
$dispatcher
private
mixed
$dispatcher
$petitionsRepository
private
mixed
$petitionsRepository
$settings
private
mixed
$settings
$translator
private
mixed
$translator
Methods
__construct()
public
__construct(EventDispatcherInterface $dispatcher, PetitionsRepository $petitionsRepository, TranslatorInterface $translator, Settings $settings) : mixed
Parameters
- $dispatcher : EventDispatcherInterface
- $petitionsRepository : PetitionsRepository
- $translator : TranslatorInterface
- $settings : Settings
Return values
mixed —faq()
public
faq(Request $request) : Response
Parameters
- $request : Request
Return values
Response —help()
public
help(Request $request) : Response
Parameters
- $request : Request
Return values
Response —primer()
public
primer() : Response
Return values
Response —report()
public
report(Request $request) : Response
Parameters
- $request : Request
Return values
Response —addNotification()
Adds a notification to the current session for type.
protected
addNotification(string $type, mixed $message) : never
Parameters
- $type : string
- $message : mixed
Tags
Return values
never —renderBlock()
Renders a view block.
protected
renderBlock(string $view, string $block[, array<string|int, mixed> $parameters = [] ][, Response|null $response = null ]) : Response
Parameters
- $view : string
- $block : string
- $parameters : array<string|int, mixed> = []
- $response : Response|null = null
Return values
Response —emailPetitionAdmin()
If the admin wants it, email the petitions to them.
private
emailPetitionAdmin(Request $request, string $name, array<string|int, mixed> $post) : void
Parameters
- $request : Request
- $name : string
- $post : array<string|int, mixed>
Return values
void —faqToc()
Creaqte list of faqs.
private
faqToc() : array<string|int, mixed>
Return values
array<string|int, mixed> —getParams()
Get default params.
private
getParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —proccessForm()
private
proccessForm(Request $request, mixed $post, mixed &$form, mixed $formEmpty) : void
Parameters
- $request : Request
- $post : mixed
- $form : mixed
- $formEmpty : mixed