Skip to content

Commit

Permalink
8.1.17
Browse files Browse the repository at this point in the history
- D8CORE-4863 Fixed type in help text
- D8CORE-4861 add config readonly ignore pattern for csv migrations
  • Loading branch information
pookmish authored Oct 11, 2021
2 parents 93b2850 + 8518730 commit 2c57ee4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Stanford Migrate

8.x-1.17
--------------------------------------------------------------------------------
_Release Date: 2021-10-11_

- D8CORE-4863 Fixed type in help text
- D8CORE-4861 add config readonly ignore pattern for csv migrations

8.x-1.16
--------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/Form/StanfordMigrateCsvImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#upload_validators' => ['file_validate_extensions' => ['csv']],
'#default_value' => array_slice($previously_uploaded_files, -1),
];
if (!empty($this->entity->source['csv_help'])) {
$help = $this->entity->source['csv_help'];
if (!empty($this->entity->get('source')['csv_help'])) {
$help = $this->entity->get('source')['csv_help'];
$form['csv_help'] = [
'#markup' => is_array($help) ? implode('<br>', $help) : $help,
];
Expand Down Expand Up @@ -161,7 +161,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['forget']['forget_previous'] = [
'#type' => 'checkbox',
'#title' => $this->t('Forget previously imported content.'),
'#description' => $this->t('<strong>DANGER</strong>: Leave this box uncheck to update existing content based on the unique identifier column(s): %ids.', ['%ids' => implode(', ', $this->migrationPlugin->getSourceConfiguration()['ids'])]),
'#description' => $this->t('<strong>DANGER</strong>: Leave this box unchecked to update existing content based on the unique identifier column(s): %ids.', ['%ids' => implode(', ', $this->migrationPlugin->getSourceConfiguration()['ids'])]),
];
return $form;
}
Expand Down
2 changes: 1 addition & 1 deletion stanford_migrate.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Adds more functionality to migrate and migrate plus modules'
type: module
core_version_requirement: ^8.8 || ^9
package: 'Stanford'
version: 8.x-1.16
version: 8.x-1.17
dependencies:
- drupal:migrate
- migrate_plus:migrate_plus
Expand Down
14 changes: 14 additions & 0 deletions stanford_migrate.module
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ function stanford_migrate_help($route_name, RouteMatchInterface $route_match) {
}
}

/**
* Implements hook_config_readonly_whitelist_patterns().
*/
function stanford_migrate_config_readonly_whitelist_patterns() {
$configs = [];
/** @var \Drupal\migrate_plus\Entity\MigrationInterface $migration */
foreach (Migration::loadMultiple() as $migration) {
if ($migration->get('source')['plugin'] == 'csv') {
$configs[] = $migration->getConfigDependencyName();
}
}
return $configs;
}

/**
* Implements hook_config_schema_info_alter().
*/
Expand Down

0 comments on commit 2c57ee4

Please sign in to comment.