Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -1,4 +1,9 @@
|
|||
services:
|
||||
plugin.manager.migrate.cckfield:
|
||||
class: Drupal\migrate\Plugin\MigratePluginManager
|
||||
arguments: [cckfield, '@container.namespaces', '@cache.discovery', '@module_handler']
|
||||
arguments:
|
||||
- cckfield
|
||||
- '@container.namespaces'
|
||||
- '@cache.discovery'
|
||||
- '@module_handler'
|
||||
- '\Drupal\migrate_drupal\Annotation\MigrateCckField'
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Annotation\MigrateCckField.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Annotation;
|
||||
|
||||
use Drupal\Component\Annotation\Plugin;
|
||||
|
||||
/**
|
||||
* Defines a cckfield plugin annotation object.
|
||||
*
|
||||
* cckfield plugins are variously responsible for handling the migration of
|
||||
* CCK fields from Drupal 6 to Drupal 8. They are allowed to alter CCK-related
|
||||
* migrations when migrations are being generated, and can compute destination
|
||||
* field types for individual fields during the actual migration process.
|
||||
*
|
||||
* Plugin Namespace: Plugin\migrate\cckfield
|
||||
*
|
||||
* @Annotation
|
||||
*/
|
||||
class MigrateCckField extends Plugin {
|
||||
|
||||
/**
|
||||
* The plugin ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* Map of D6 and D7 field types to D8 field type plugin IDs.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $type_map = [];
|
||||
|
||||
}
|
|
@ -9,6 +9,7 @@ namespace Drupal\migrate_drupal\Plugin;
|
|||
|
||||
use Drupal\Component\Plugin\PluginInspectionInterface;
|
||||
use Drupal\migrate\Entity\MigrationInterface;
|
||||
use Drupal\migrate\Row;
|
||||
|
||||
/**
|
||||
* Provides an interface for all CCK field type plugins.
|
||||
|
@ -77,4 +78,15 @@ interface MigrateCckFieldInterface extends PluginInspectionInterface {
|
|||
*/
|
||||
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data);
|
||||
|
||||
/**
|
||||
* Computes the destination type of a migrated field.
|
||||
*
|
||||
* @param \Drupal\migrate\Row $row
|
||||
* The field being migrated.
|
||||
*
|
||||
* @return string
|
||||
* The destination field type.
|
||||
*/
|
||||
public function getFieldType(Row $row);
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Drupal\migrate_drupal\Plugin\migrate\cckfield;
|
|||
|
||||
use Drupal\Core\Plugin\PluginBase;
|
||||
use Drupal\migrate\Entity\MigrationInterface;
|
||||
use Drupal\migrate\Row;
|
||||
use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface;
|
||||
|
||||
/**
|
||||
|
@ -70,4 +71,18 @@ abstract class CckFieldPluginBase extends PluginBase implements MigrateCckFieldI
|
|||
$migration->mergeProcessOfProperty('options/type', $process);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFieldType(Row $row) {
|
||||
$field_type = $row->getSourceProperty('type');
|
||||
|
||||
if (isset($this->pluginDefinition['type_map'][$field_type])) {
|
||||
return $this->pluginDefinition['type_map'][$field_type];
|
||||
}
|
||||
else {
|
||||
return $field_type;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33409,7 +33409,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'dblog_row_limit',
|
||||
'value' => 'i:1000;',
|
||||
'value' => 'i:10000;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'drupal_badge_color',
|
||||
|
|
|
@ -40813,7 +40813,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'cache_flush_cache',
|
||||
'value' => 'i:1444944970;',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cache_flush_cache_block',
|
||||
|
@ -40821,7 +40821,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'cache_flush_cache_field',
|
||||
'value' => 'i:1444944970;',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cache_flush_cache_filter',
|
||||
|
@ -41063,6 +41063,10 @@ $connection->insert('variable')
|
|||
'name' => 'date_default_timezone',
|
||||
'value' => 's:15:"America/Chicago";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'dblog_row_limit',
|
||||
'value' => 'i:10000;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'default_nodes_main',
|
||||
'value' => 's:2:"10";',
|
||||
|
|
Reference in a new issue