ComplexSearchForm
extends FormBase
in package
Table of Contents
Properties
- $categoryData : mixed
- $entityData : mixed
- $helper : mixed
- $lastModifyDateTime : mixed
- $model : mixed
- $reCache : mixed
- $searchStr : mixed
- $yearsData : mixed
Methods
- __construct() : mixed
- Set up necessary properties
- buildForm() : array<string|int, mixed>
- Build form
- getFormId() : string
- Set up the form id
- submitForm() : mixed
- Form submit
- validateForm() : mixed
- Validate the form
- addPayload() : mixed
- addSearchCategory() : mixed
- addSearchDate() : mixed
- addSearchText() : mixed
- addSearchType() : mixed
- addSubmitButton() : mixed
- createBox() : mixed
- Create the checkbox templates
- createSearchInput() : array<string|int, mixed>
- this function creates the search input field
- doTheRequest() : string
- Fetch the API with the search facets
- generateMetaUrlString() : mixed
- getBoxData() : array<string|int, mixed>
- getCacheLastModificationDate() : string
Properties
$categoryData
private
mixed
$categoryData
= array()
$entityData
private
mixed
$entityData
= array()
$helper
private
mixed
$helper
$lastModifyDateTime
private
mixed
$lastModifyDateTime
$model
private
mixed
$model
$reCache
private
mixed
$reCache
= false
$searchStr
private
mixed
$searchStr
= ""
$yearsData
private
mixed
$yearsData
= array()
Methods
__construct()
Set up necessary properties
public
__construct() : mixed
buildForm()
Build form
public
buildForm(array<string|int, mixed> $form, FormStateInterface $form_state) : array<string|int, mixed>
Parameters
- $form : array<string|int, mixed>
- $form_state : FormStateInterface
Return values
array<string|int, mixed>getFormId()
Set up the form id
public
getFormId() : string
Return values
stringsubmitForm()
Form submit
public
submitForm(array<string|int, mixed> &$form, FormStateInterface $form_state) : mixed
Parameters
- $form : array<string|int, mixed>
- $form_state : FormStateInterface
validateForm()
Validate the form
public
validateForm(array<string|int, mixed> &$form, FormStateInterface $form_state) : mixed
Parameters
- $form : array<string|int, mixed>
- $form_state : FormStateInterface
addPayload()
private
addPayload([mixed $payload = "" ]) : mixed
Parameters
- $payload : mixed = ""
addSearchCategory()
private
addSearchCategory([mixed $category = "" ]) : mixed
Parameters
- $category : mixed = ""
addSearchDate()
private
addSearchDate(mixed $years) : mixed
Parameters
- $years : mixed
addSearchText()
private
addSearchText([mixed $text = "" ]) : mixed
Parameters
- $text : mixed = ""
addSearchType()
private
addSearchType([mixed $types = "" ]) : mixed
Parameters
- $types : mixed = ""
addSubmitButton()
private
addSubmitButton(array<string|int, mixed> &$form) : mixed
Parameters
- $form : array<string|int, mixed>
createBox()
Create the checkbox templates
private
createBox(array<string|int, mixed> &$form, array<string|int, mixed> $data) : mixed
Parameters
- $form : array<string|int, mixed>
- $data : array<string|int, mixed>
createSearchInput()
this function creates the search input field
private
createSearchInput(array<string|int, mixed> &$form) : array<string|int, mixed>
Parameters
- $form : array<string|int, mixed>
Return values
array<string|int, mixed>doTheRequest()
Fetch the API with the search facets
private
doTheRequest() : string
Return values
stringgenerateMetaUrlString()
private
generateMetaUrlString(FormStateInterface &$form_state) : mixed
Parameters
- $form_state : FormStateInterface
getBoxData()
private
getBoxData(string $type) : array<string|int, mixed>
Parameters
- $type : string
Return values
array<string|int, mixed>getCacheLastModificationDate()
private
getCacheLastModificationDate() : string