Skip to content

Instantly share code, notes, and snippets.

@jamesob
Created February 15, 2012 20:47
Show Gist options
  • Save jamesob/1838892 to your computer and use it in GitHub Desktop.
Save jamesob/1838892 to your computer and use it in GitHub Desktop.
HOT FIRE
<?php
/**
* Internal function for mapping a section term to a node given a term name.
*/
private function map_section_from_tax(&$node, $item, $term_names) {
$term_names = new ArrWrap($term_names);
$section_tids = $term_names
->map(array($this->tax_util, 'get_term'))
->map(function ($p) { return $p->field_tref_section[LANGUAGE_NONE][0]['tid']; })
->filter();
FpeNodeMapper::assign_field($node, 'field_op_section_term',
$section_tids->arr, 'tid');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment