-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdpl_pretix.module
More file actions
88 lines (75 loc) · 2.44 KB
/
dpl_pretix.module
File metadata and controls
88 lines (75 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* @file
* Module file for dpl_pretix.
*/
use Drupal\Core\Access\AccessResultInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\dpl_pretix\EntityHelper;
use Drupal\dpl_pretix\FormHelper;
use Drupal\recurring_events\Entity\EventSeries;
/**
* Implements hook_form_alter().
*/
function dpl_pretix_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
_dpl_pretix_form_helper()->formAlter($form, $form_state, $form_id);
}
/**
* Implements hook_field_group_form_process_build_alter().
*/
function dpl_pretix_field_group_form_process_build_alter(array &$element, FormStateInterface $form_state, array &$complete_form): void {
_dpl_pretix_form_helper()->fieldGroupFormProcessBuildAlter($element, $form_state, $complete_form);
}
/**
* Implements hook_entity_insert().
*/
function dpl_pretix_entity_insert(EntityInterface $entity): void {
_dpl_pretix_entity_helper()->entityInsert($entity);
}
/**
* Implements hook_entity_update().
*/
function dpl_pretix_entity_update(EntityInterface $entity): void {
_dpl_pretix_entity_helper()->entityUpdate($entity);
}
/**
* Implements hook_entity_delete().
*/
function dpl_pretix_entity_delete(EntityInterface $entity): void {
_dpl_pretix_entity_helper()->entityDelete($entity);
}
/**
* Implements hook_entity_access().
*/
function dpl_pretix_entity_access(EntityInterface $entity, string $operation, AccountInterface $account): AccessResultInterface {
return _dpl_pretix_entity_helper()->access($entity, $operation, $account);
}
/**
* Implements hook_entity_prepare_form().
*/
function dpl_pretix_entity_prepare_form(EntityInterface $entity, string $operation, FormStateInterface $form_state): void {
_dpl_pretix_form_helper()->prepareForm($entity, $operation, $form_state);
}
/**
* Implements hook_recurring_events_event_instances_pre_create_alter().
*/
function dpl_pretix_recurring_events_event_instances_pre_create_alter(array $events_to_create, EventSeries $event): array {
return _dpl_pretix_entity_helper()->recurringEventsEventInstancesPreCreateAlter($events_to_create, $event);
}
/**
* Get form helper.
*/
function _dpl_pretix_form_helper(): FormHelper {
return \Drupal::service(FormHelper::class);
}
/**
* Get event helper.
*/
function _dpl_pretix_entity_helper(): EntityHelper {
return \Drupal::service(EntityHelper::class);
}
// Local Variables:
// mode: php
// End: