Last active
July 12, 2018 17:28
-
-
Save ahebrank/5a6a9266326ec073ac1aef36c163143a to your computer and use it in GitHub Desktop.
Simple entity merge: check for content entity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/simple_entity_merge.module b/simple_entity_merge.module | |
| index 277824e..1dae9fb 100644 | |
| --- a/simple_entity_merge.module | |
| +++ b/simple_entity_merge.module | |
| @@ -12,6 +12,9 @@ use Drupal\Core\Entity\EntityInterface; | |
| */ | |
| function simple_entity_merge_entity_type_alter(array &$entity_types) { | |
| foreach ($entity_types as $entity_type_id => $entity_type) { | |
| + if (!$entity_type->isTranslatable()) { | |
| + continue; | |
| + } | |
| if (($entity_type->getFormClass('default') || $entity_type->getFormClass('edit')) && $entity_type->hasLinkTemplate('edit-form')) { | |
| $entity_type->setLinkTemplate('simple_entity_merge-execute', "/simple_entity_merge/$entity_type_id/{{$entity_type_id}}"); | |
| $entity_type->setFormClass('simple_entity_merge', 'Drupal\simple_entity_merge\Form\Merge'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment