Skip to content

Instantly share code, notes, and snippets.

@cjming
cjming / core.entity_form_display.node.event.default.yml
Last active August 12, 2016 14:45
Example yaml files for D8 custom views sort plugin
langcode: en
status: true
dependencies:
config:
- field.field.node.event.body
- field.field.node.event.field_event_date
- node.type.event
module:
- datetime
- path
@cjming
cjming / my_module.install
Last active December 7, 2017 03:11
Taxonomy term shuffles - run hook updates with batch API in D7
/**
* Implements hook_update_N().
*
* Re-assign nodes from one set of terms to new set of taxonomy terms.
* Redirect old terms pages to new terms pages.
* Output updated nodes and tids to CSV.
* Delete old set of taxonomy terms.
*/
function my_module_update_7001(&$sandbox) {
@cjming
cjming / migration_filepath_custom.drush.inc
Last active August 29, 2017 18:38
Drush command to move files into a custom parent and child subfolders.
<?php
/**
* @file
* Drush command to move files into a custom parent and child subfolders.
*/
/**
* Implements hook_drush_command().
*/
function migration_filepath_custom_drush_command() {