This file contains hidden or 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 | |
/** | |
* Command callback. drush update-assets-via-csv | |
*/ | |
function drush_capacitype_deploy_update_assets_via_csv() { | |
$source_csv = (!is_null(drush_get_option('csv'))) ? drush_get_option('csv') : ''; | |
if (empty($source_csv)) { | |
drush_print_r('Expected parameter, csv not found.'); | |
return; |
This file contains hidden or 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
langcode: en | |
status: true | |
migration_tags: | |
- CSV | |
- non-aa | |
id: naw_adds_2pf_recovery_support | |
migration_group: csvimports | |
label: "Imports data from naw-adds-import.csv to paragraph:profile_support" | |
dependencies: | |
enforced: |
This file contains hidden or 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
field_mandates/target_id: | |
- | |
plugin: migration | |
migration: d7_field_collection | |
source: value | |
- | |
plugin: extract | |
index: | |
- '0' | |
field_mandates/target_revision_id: |
This file contains hidden or 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: assetnode2model | |
label: "Asset Nodes to asset model." | |
migration_group: d82tables | |
dependencies: | |
enforced: | |
module: | |
- capacitype_move2aa | |
langcode: en | |
status: true | |
source: |
This file contains hidden or 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: termgroup2table | |
label: "Group taxonomy terms to group model." | |
migration_group: d82tables | |
dependencies: | |
enforced: | |
module: | |
- capacitype_move2aa | |
langcode: en | |
status: true | |
source: |
This file contains hidden or 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 | |
namespace Drupal\capacitype_move2aa\Plugin\migrate\destination; | |
use Drupal\Core\Database\Connection; | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
use Drupal\migrate\MigrateException; | |
use Drupal\migrate\MigrateSkipProcessException; | |
use Drupal\migrate\Plugin\MigrationInterface; |
This file contains hidden or 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 | |
$nids = []; | |
// example nids has 10k+ | |
// $nids = some_logic(); | |
$node_records = []; $throughput = 50; $nids = array_chunk($nids, $throughput); | |
foreach ($nids as $subset_id => $subset_nids) { | |
// var_dump([$subset_id,memory_get_peak_usage(),]); | |
$nodes = []; | |
$nodes = entity_load_multiple('node', $subset_nids, TRUE); |
This file contains hidden or 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 | |
namespace Backpack\NewsCRUD\app\Http\Controllers\Admin; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
// VALIDATION: change the requests to match your own file names if you need form validation | |
use Backpack\NewsCRUD\app\Http\Requests\ArticleRequest as StoreRequest; | |
use Backpack\NewsCRUD\app\Http\Requests\ArticleRequest as UpdateRequest; | |
class ArticleCrudController extends CrudController |
This file contains hidden or 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 | |
namespace Backpack\NewsCRUD\app\Http\Controllers\Admin; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
// VALIDATION: change the requests to match your own file names if you need form validation | |
use Backpack\NewsCRUD\app\Http\Requests\ArticleRequest as StoreRequest; | |
use Backpack\NewsCRUD\app\Http\Requests\ArticleRequest as UpdateRequest; | |
class ArticleCrudController extends CrudController |
This file contains hidden or 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 | |
namespace App\Http\Controllers\Admin; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use App\Http\Requests\VocabularyCrudRequest as StoreRequest; | |
use App\Http\Requests\VocabularyCrudRequest as UpdateRequest; | |
class VocabularyCrudController extends CrudController { |