ReuseGuideForm
extends FormBase
in package
Provides a form to reuse existing guide items.
Table of Contents
Methods
- buildForm() : array<string|int, mixed>
- Builds the guide reuse form with a select field populated with existing guides.
- getFormId() : string
- {@inheritdoc}
- submitForm() : void
- Handles the form submission to duplicate the selected guide.
Methods
buildForm()
Builds the guide reuse form with a select field populated with existing guides.
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> —The form array.
getFormId()
{@inheritdoc}
public
getFormId() : string
Return values
stringsubmitForm()
Handles the form submission to duplicate the selected guide.
public
submitForm(array<string|int, mixed> &$form, FormStateInterface $form_state) : void
Clones the selected guide and all its associated content, like guide boxes and pages, setting up a new guide with the same structure and content but under a new title and ownership.
Parameters
- $form : array<string|int, mixed>
- $form_state : FormStateInterface