diff --git a/modules/opencase_cases/config/schema/oc_case_type.schema.yml b/modules/opencase_cases/config/schema/oc_case_type.schema.yml index 7c64e98..61e8a19 100644 --- a/modules/opencase_cases/config/schema/oc_case_type.schema.yml +++ b/modules/opencase_cases/config/schema/oc_case_type.schema.yml @@ -1,4 +1,4 @@ -opencase_entities.oc_case_type.*: +opencase_cases.oc_case_type.*: type: config_entity label: 'Case type config' mapping: diff --git a/modules/opencase_cases/opencase_cases.info.yml b/modules/opencase_cases/opencase_cases.info.yml index 945069d..ec9d37f 100644 --- a/modules/opencase_cases/opencase_cases.info.yml +++ b/modules/opencase_cases/opencase_cases.info.yml @@ -4,4 +4,4 @@ description: 'Provides case entities and a required field on activities linking core: 8.x package: 'OpenCase' dependencies: - - opencase_entities + - opencase_cases diff --git a/modules/opencase_cases/opencase_cases.module b/modules/opencase_cases/opencase_cases.module index 8994127..f218d80 100644 --- a/modules/opencase_cases/opencase_cases.module +++ b/modules/opencase_cases/opencase_cases.module @@ -35,14 +35,13 @@ function opencase_cases_theme() { 'render element' => 'elements', 'file' => 'oc_case.page.inc', 'template' => 'oc_case', - ] + ], 'oc_case_content_add_list' => [ 'render element' => 'content', 'variables' => ['content' => NULL], 'file' => 'oc_case.page.inc', ] ]; - ]; } function opencase_cases_entity_base_field_info($entity_type) { @@ -50,7 +49,7 @@ function opencase_cases_entity_base_field_info($entity_type) { // Add Case field to Activity if ($entity_type->id() === 'oc_activity') { - $fields['oc_case'] = BaseFieldDefinition::create('entity_reference') + $fields['oc_case'] = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference') ->setLabel(t('Case')) ->setDescription(t('The case this activity belongs to.')) ->setSetting('target_type', 'oc_case') @@ -70,7 +69,7 @@ function opencase_cases_entity_base_field_info($entity_type) { /** * When creating an activity, it sets the case id from the URL. */ -public static function opencase_cases_default_activity_case_value() { +function opencase_cases_default_activity_case_value() { return array(\Drupal::request()->query->get('case_id')); } diff --git a/modules/opencase_cases/src/CaseInvolvement.php b/modules/opencase_cases/src/CaseInvolvement.php index 525f4dc..c14aa66 100644 --- a/modules/opencase_cases/src/CaseInvolvement.php +++ b/modules/opencase_cases/src/CaseInvolvement.php @@ -1,6 +1,6 @@ loadRevision($vid); // Only show revisions that are affected by the language that is being // displayed. diff --git a/modules/opencase_cases/src/Entity/OCCase.php b/modules/opencase_cases/src/Entity/OCCase.php index 78856b3..2fb2a83 100644 --- a/modules/opencase_cases/src/Entity/OCCase.php +++ b/modules/opencase_cases/src/Entity/OCCase.php @@ -1,6 +1,6 @@ entity->isNew()) { diff --git a/modules/opencase_cases/src/Form/OCCaseRevisionDeleteForm.php b/modules/opencase_cases/src/Form/OCCaseRevisionDeleteForm.php index f3de820..b4a6039 100644 --- a/modules/opencase_cases/src/Form/OCCaseRevisionDeleteForm.php +++ b/modules/opencase_cases/src/Form/OCCaseRevisionDeleteForm.php @@ -1,6 +1,6 @@ getValue('revert_untranslated_fields'); - /** @var \Drupal\opencase_entities\Entity\OCCaseInterface $default_revision */ + /** @var \Drupal\opencase_cases\Entity\OCCaseInterface $default_revision */ $latest_revision = $this->OCCaseStorage->load($revision->id()); $latest_revision_translation = $latest_revision->getTranslation($this->langcode); diff --git a/modules/opencase_cases/src/Form/OCCaseSettingsForm.php b/modules/opencase_cases/src/Form/OCCaseSettingsForm.php index 217ed23..79bbf9f 100644 --- a/modules/opencase_cases/src/Form/OCCaseSettingsForm.php +++ b/modules/opencase_cases/src/Form/OCCaseSettingsForm.php @@ -1,6 +1,6 @@ 'machine_name', '#default_value' => $oc_case_type->id(), '#machine_name' => [ - 'exists' => '\Drupal\opencase_entities\Entity\OCCaseType::load', + 'exists' => '\Drupal\opencase_cases\Entity\OCCaseType::load', ], '#disabled' => !$oc_case_type->isNew(), ]; diff --git a/modules/opencase_cases/src/OCCaseAccessControlHandler.php b/modules/opencase_cases/src/OCCaseAccessControlHandler.php index f349de9..1fe2bda 100644 --- a/modules/opencase_cases/src/OCCaseAccessControlHandler.php +++ b/modules/opencase_cases/src/OCCaseAccessControlHandler.php @@ -1,17 +1,17 @@ isPublished()) { diff --git a/modules/opencase_cases/src/OCCaseHtmlRouteProvider.php b/modules/opencase_cases/src/OCCaseHtmlRouteProvider.php index a039952..2ae1795 100644 --- a/modules/opencase_cases/src/OCCaseHtmlRouteProvider.php +++ b/modules/opencase_cases/src/OCCaseHtmlRouteProvider.php @@ -1,6 +1,6 @@ setDefaults([ '_title' => "{$entity_type->getLabel()} revisions", - '_controller' => '\Drupal\opencase_entities\Controller\OCCaseController::revisionOverview', + '_controller' => '\Drupal\opencase_cases\Controller\OCCaseController::revisionOverview', ]) ->setRequirement('_permission', 'access case revisions') ->setOption('_admin_route', TRUE); @@ -87,8 +87,8 @@ class OCCaseHtmlRouteProvider extends AdminHtmlRouteProvider { $route = new Route($entity_type->getLinkTemplate('revision')); $route ->setDefaults([ - '_controller' => '\Drupal\opencase_entities\Controller\OCCaseController::revisionShow', - '_title_callback' => '\Drupal\opencase_entities\Controller\OCCaseController::revisionPageTitle', + '_controller' => '\Drupal\opencase_cases\Controller\OCCaseController::revisionShow', + '_title_callback' => '\Drupal\opencase_cases\Controller\OCCaseController::revisionPageTitle', ]) ->setRequirement('_permission', 'access case revisions') ->setOption('_admin_route', TRUE); @@ -111,7 +111,7 @@ class OCCaseHtmlRouteProvider extends AdminHtmlRouteProvider { $route = new Route($entity_type->getLinkTemplate('revision_revert')); $route ->setDefaults([ - '_form' => '\Drupal\opencase_entities\Form\OCCaseRevisionRevertForm', + '_form' => '\Drupal\opencase_cases\Form\OCCaseRevisionRevertForm', '_title' => 'Revert to earlier revision', ]) ->setRequirement('_permission', 'revert all case revisions') @@ -135,7 +135,7 @@ class OCCaseHtmlRouteProvider extends AdminHtmlRouteProvider { $route = new Route($entity_type->getLinkTemplate('revision_delete')); $route ->setDefaults([ - '_form' => '\Drupal\opencase_entities\Form\OCCaseRevisionDeleteForm', + '_form' => '\Drupal\opencase_cases\Form\OCCaseRevisionDeleteForm', '_title' => 'Delete earlier revision', ]) ->setRequirement('_permission', 'delete all case revisions') @@ -159,7 +159,7 @@ class OCCaseHtmlRouteProvider extends AdminHtmlRouteProvider { $route = new Route($entity_type->getLinkTemplate('translation_revert')); $route ->setDefaults([ - '_form' => '\Drupal\opencase_entities\Form\OCCaseRevisionRevertTranslationForm', + '_form' => '\Drupal\opencase_cases\Form\OCCaseRevisionRevertTranslationForm', '_title' => 'Revert to earlier revision of a translation', ]) ->setRequirement('_permission', 'revert all case revisions') @@ -183,7 +183,7 @@ class OCCaseHtmlRouteProvider extends AdminHtmlRouteProvider { $route = new Route("/admin/structure/{$entity_type->id()}/settings"); $route ->setDefaults([ - '_form' => 'Drupal\opencase_entities\Form\OCCaseSettingsForm', + '_form' => 'Drupal\opencase_cases\Form\OCCaseSettingsForm', '_title' => "{$entity_type->getLabel()} settings", ]) ->setRequirement('_permission', $entity_type->getAdminPermission()) diff --git a/modules/opencase_cases/src/OCCaseListBuilder.php b/modules/opencase_cases/src/OCCaseListBuilder.php index 0ab0404..46a70b6 100644 --- a/modules/opencase_cases/src/OCCaseListBuilder.php +++ b/modules/opencase_cases/src/OCCaseListBuilder.php @@ -1,6 +1,6 @@ id(); $row['name'] = Link::createFromRoute( $entity->label(), diff --git a/modules/opencase_cases/src/OCCaseStorage.php b/modules/opencase_cases/src/OCCaseStorage.php index 8f7e2eb..4100878 100644 --- a/modules/opencase_cases/src/OCCaseStorage.php +++ b/modules/opencase_cases/src/OCCaseStorage.php @@ -1,11 +1,11 @@