comparison core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php 1 <?php
2 2
3 namespace Drupal\migrate_drupal\Plugin; 3 namespace Drupal\migrate_drupal\Plugin;
4 4
5 use Drupal\Component\Plugin\Exception\PluginNotFoundException; 5 use Drupal\Component\Plugin\Exception\PluginNotFoundException;
6 use Drupal\migrate\Plugin\Exception\BadPluginDefinitionException;
6 use Drupal\migrate\Plugin\MigratePluginManager; 7 use Drupal\migrate\Plugin\MigratePluginManager;
7 use Drupal\migrate\Plugin\MigrationInterface; 8 use Drupal\migrate\Plugin\MigrationInterface;
8 9
9 /** 10 /**
10 * Plugin manager for migrate field plugins. 11 * Plugin manager for migrate field plugins.
51 } 52 }
52 } 53 }
53 throw new PluginNotFoundException($field_type); 54 throw new PluginNotFoundException($field_type);
54 } 55 }
55 56
57 /**
58 * {@inheritdoc}
59 */
60 public function processDefinition(&$definition, $plugin_id) {
61 parent::processDefinition($definition, $plugin_id);
62
63 foreach (['core', 'source_module', 'destination_module'] as $required_property) {
64 if (empty($definition[$required_property])) {
65 throw new BadPluginDefinitionException($plugin_id, $required_property);
66 }
67 }
68 }
69
56 } 70 }