Documentation

CatalogItemFormHooks
in package

Form hook implementations for ilms_catalg.

Table of Contents

Properties

$entityTypeManager  : EntityTypeManagerInterface
$requestStack  : RequestStack
$syncFieldManager  : SyncFieldManager

Methods

__construct()  : mixed
entityPrepareForm()  : mixed
Implements hook_entity_prepare_form().
entityViewDisplayEditFormAlter()  : void
Implements hook_views_data_alter().
formAlter()  : mixed
Implements hook_form_alter().

Properties

Methods

__construct()

public __construct(RequestStack $requestStack, EntityTypeManagerInterface $entityTypeManager, SyncFieldManager $syncFieldManager) : mixed
Parameters
$requestStack : RequestStack
$entityTypeManager : EntityTypeManagerInterface
$syncFieldManager : SyncFieldManager

entityPrepareForm()

Implements hook_entity_prepare_form().

public entityPrepareForm(EntityInterface $entity, string $operation, FormStateInterface $form_state) : mixed

This method should check if an entity is being created as a 'parent' or not.

If not, then it copies the 'shared' field values from the parent to the copy.

Parameters
$entity : EntityInterface

The entity to modify.

$operation : string

The operation being performed.

$form_state : FormStateInterface

The current form state.

Attributes
#[Hook]
'entity_prepare_form'

entityViewDisplayEditFormAlter()

Implements hook_views_data_alter().

public entityViewDisplayEditFormAlter(array<string|int, mixed> &$form, FormStateInterface $form_state) : void
Parameters
$form : array<string|int, mixed>

The form object to modify.

$form_state : FormStateInterface

The current form state.

Attributes
#[Hook]
'form_entity_view_display_edit_form_alter'

formAlter()

Implements hook_form_alter().

public formAlter(mixed &$form, FormStateInterface $form_state) : mixed

Placed here for development purposes. Can safely remove after development is complete.

Parameters
$form : mixed
$form_state : FormStateInterface
Attributes
#[Hook]
'form_alter'

        
On this page

Search results