This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$entity_type_id = $_SERVER['argv'][3]; | |
$process = implode(":\n ", array_keys(\Drupal::service('entity_field.manager')->getFieldMap()[$entity_type_id])); | |
print <<<EOT | |
id: | |
label: | |
source: | |
plugin: | |
constants: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: discussion_aliases | |
label: Discussion aliases | |
source: | |
plugin: d7_node | |
node_type: discussion | |
constants: | |
english: en | |
node: /node | |
empty: "" | |
process: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[4.6MB/0.01s] Reading ./composer.json | |
[4.7MB/0.01s] Loading config file /home/chx/.composer/config.json | |
[4.7MB/0.01s] Loading config file /home/chx/.composer/auth.json | |
[4.7MB/0.01s] Loading config file ./composer.json | |
[5.0MB/0.02s] Checking CA file /etc/ca-certificates/extracted/tls-ca-bundle.pem | |
[5.6MB/0.02s] Executing command (/tmp/d8): git branch --no-color --no-abbrev -v | |
[7.4MB/0.05s] Reading /home/chx/.composer/composer.json | |
[7.4MB/0.05s] Loading config file /home/chx/.composer/config.json | |
[7.4MB/0.05s] Loading config file /home/chx/.composer/auth.json | |
[7.4MB/0.05s] Loading config file /home/chx/.composer/composer.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo composer self-update | |
Updating to version 02ed27b16b184ecd6befed5bf8f6501084b42c0e. | |
Downloading: 100% | |
Use composer self-update --rollback to return to version 1.0.0-alpha11 | |
➜ d8 git:(8.0.x) ✗ time composer require drupal/page_manager | |
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug | |
^C | |
composer require drupal/page_manager 0.54s user 0.05s system 15% cpu 3.756 total | |
➜ d8 git:(8.0.x) ✗ sudo nano /etc/php/php.ini | |
➜ d8 git:(8.0.x) ✗ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When looking up the destination ID we require an array with both the | |
// source key and value, e.g. ['nid' => 41]. In this case, $source_id_values need to be ordered the same | |
// order as $this->sourceIdFields(). However, the Migration process | |
// plugin doesn't currently have a way to get the source key so we presume | |
// the values have been passed through in the correct order. | |
if (!isset($source_id_values[0])) { | |
$source_id_values = array_intersect_key($this->sourceIdFields(), $source_id_values); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\StreamWrapper\FileDatabaseStream. | |
*/ | |
namespace Drupal\Core\StreamWrapper; | |
use Drupal\Core\KeyValueStore\KeyValueStoreInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\migrate_plus\Plugin\migrate\process\TermReference. | |
*/ | |
namespace Drupal\migrate_plus\Plugin\migrate\process; | |
use Drupal\taxonomy\TermStorageInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db.test.drop(); | |
true | |
> db.test.insert({f1:[1],f2:[1]}); | |
WriteResult({ "nInserted" : 1 }) | |
> db.test.find().sort({'f1':1,'f2':1}); | |
error: { | |
"$err" : "Runner error: BadValue cannot sort with keys that are parallel arrays", | |
"code" : 17144 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT path | |
FROM menu_router | |
WHERE load_functions IN | |
(SELECT DISTINCT concat('a:1:{i:1;s:', length(concat(entity_type, '_load')), ':"', entity_type, '_load";}') | |
FROM field_config fc | |
INNER JOIN field_config_instance fci ON fci.field_id=fc.id | |
WHERE fc.active=1 AND fc.translatable=1) | |
AND path NOT LIKE '%/%/%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function next() { | |
$this->currentIds = NULL; | |
$this->currentRow = NULL; | |
$source_configuration = $this->migration->get('source'); | |
while ($this->getIterator()->valid()) { | |
$row_data = $this->getIterator()->current() + $source_configuration; | |
$this->getIterator()->next(); | |
$row = new Row($row_data, $this->migration->getSourcePlugin()->getIds(), $this->migration->get('destinationIds')); |