Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

View file

@ -3,12 +3,12 @@
namespace Drupal\user\Plugin\migrate;
use Drupal\migrate\Exception\RequirementsException;
use Drupal\migrate_drupal\Plugin\migrate\CckMigration;
use Drupal\migrate_drupal\Plugin\migrate\FieldMigration;
/**
* Plugin class for Drupal 7 user migrations dealing with fields and profiles.
*/
class User extends CckMigration {
class User extends FieldMigration {
/**
* {@inheritdoc}
@ -30,16 +30,26 @@ class User extends CckMigration {
if (empty($field_type)) {
continue;
}
if ($this->cckPluginManager->hasDefinition($field_type)) {
if (!isset($this->cckPluginCache[$field_type])) {
$this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this);
if ($this->fieldPluginManager->hasDefinition($field_type)) {
if (!isset($this->fieldPluginCache[$field_type])) {
$this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($field_type, [], $this);
}
$info = $row->getSource();
$this->cckPluginCache[$field_type]
->processCckFieldValues($this, $field_name, $info);
$this->fieldPluginCache[$field_type]
->processFieldValues($this, $field_name, $info);
}
else {
$this->process[$field_name] = $field_name;
if ($this->cckPluginManager->hasDefinition($field_type)) {
if (!isset($this->cckPluginCache[$field_type])) {
$this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this);
}
$info = $row->getSource();
$this->cckPluginCache[$field_type]
->processCckFieldValues($this, $field_name, $info);
}
else {
$this->process[$field_name] = $field_name;
}
}
}
}

View file

@ -74,6 +74,9 @@ class Roles extends ManyToOne {
*/
public function calculateDependencies() {
$dependencies = [];
if (in_array($this->operator, ['empty', 'not empty'])) {
return $dependencies;
}
foreach ($this->value as $role_id) {
$role = $this->roleStorage->load($role_id);
$dependencies[$role->getConfigDependencyKey()][] = $role->getConfigDependencyName();