moved entity type relations widget into opencase_defaults
This commit is contained in:
parent
ca1a0eda29
commit
113ff6361b
@ -8,6 +8,7 @@
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\user\Entity\Role;
|
||||
use Drupal\user\RoleInterface;
|
||||
use Drupal\opencase\EntityTypeRelationsWidget;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
@ -146,3 +147,21 @@ function opencase_defaults_actors_involved_callback() {
|
||||
return array_unique([$currently_viewed_actor_id, $author_linked_actor_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_defaults_form_oc_case_type_add_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_defaults_form_oc_case_type_edit_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
$widget->populate($form);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\Access\AccessResult;
|
||||
use Drupal\opencase\EntityTypeRelationsWidget;
|
||||
|
||||
/**
|
||||
* Implements hook_element_info_alter().
|
||||
@ -81,24 +80,6 @@ function opencase_theme() {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_form_oc_case_type_add_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_form_oc_case_type_edit_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
$widget->populate($form);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
* Removes configs.
|
||||
|
Reference in New Issue
Block a user