Resolve #2002174 "Validatable vocabulary"
3 unresolved threads
Closes #2002174
Merge request reports
Activity
Filter activity
added 1 commit
- 63b177fd - Refine the `entity:taxonomy_vocabulary` @MigrateDestination plugin — matching...
added 1 commit
- 7698c9c0 - `Vocabulary::getDescription()` must always return a string to comply with its...
added 1 commit
- c544693a - Override `EntityForm::buildEntity()` in `VocabularyForm` — matching what...
added 1 commit
- f7fa0478 - Update expectations in `VocabularyValidationTest` — no additional test...
- Resolved by Wim Leers
5 namespace Drupal\taxonomy\Plugin\migrate\destination; 6 7 use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase; 8 use Drupal\migrate\Row; 9 10 /** 11 * @MigrateDestination( 12 * id = "entity:taxonomy_vocabulary" 13 * ) 14 */ 15 class EntityTaxonomyVocabulary extends EntityConfigBase { 16 17 /** 18 * {@inheritdoc} 19 */ 20 public function getEntity(Row $row, array $old_destination_id_values) { - Resolved by Wim Leers
42 42 ); 43 43 } 44 44 45 /** 46 * {@inheritdoc} 47 */ 48 public function buildEntity(array $form, FormStateInterface $form_state) { - Resolved by Wim Leers
added 1 commit
31 32 return TRUE; 32 33 }); 33 34 } 35 36 /** 37 * Converts empty `help` in vocabularies to NULL. 38 */ 39 function taxonomy_post_update_set_vocabulary_description_to_null(array &$sandbox): void { 40 \Drupal::classResolver(ConfigEntityUpdater::class) 41 ->update($sandbox, 'taxonomy_vocabulary', function (VocabularyInterface $vocabulary): bool { 42 // Vocabularies' `description` field must be stored as NULL at the config 43 // level if it is empty. 44 if (trim($vocabulary->getDescription()) === '') { changed this line in version 11 of the diff
Please register or sign in to reply