Skip to content

Instantly share code, notes, and snippets.

@abarriosr
abarriosr / umg_custom_mapping.info
Last active April 18, 2017 21:35
umg_custom_mapping
name = UMG Custom Mapping
description = Converts Video embed field to media youtube and events venue fields to venue entity.
package = Content Hub
dependencies[] = content_hub_connector
dependencies[] = media_internet
dependencies[] = media_youtube
core = 7.x
@abarriosr
abarriosr / ach-bulk-export-batch-functions.php
Last active November 9, 2018 22:31
Bulk exports all entities according to the selection on the Entity Configuration page. IMPORTANT: Use only with Export Queue Enabled.
<?php
/**
* Process a subset of all the entities to be enqueued in a single request.
*
* @param $entity_type
* The entity type.
* @param $bundle
* The entity bundle.
* @param $bundle_key
@abarriosr
abarriosr / ach-bulk-import.php
Last active April 4, 2022 14:30
Bulk Import Script with pagination support. Allows massive import of entities from Content Hub.
<?php
/**
* @file
* Add entities from Content Hub to the Import Queue.
*
* Please locate this field in the 'scripts' directory as a sibling of docroot:
* <DOCROOT>/../scripts/ach-bulk-import.php
*
* To run the script, execute the drush command:
* $drush scr ../scripts/ach-bulk-import.php