function _hashtags_field_attach_term in Hashtags 8
Helper function that attach a term to the taxonomy terms hashtags field
Parameters
$field:
$tid:
string $vid:
File
- ./
hashtags.module, line 235
Code
function _hashtags_field_attach_term($field, $tid, $vid = 'hashtags') {
// create term and attach to the field
$hashtags = $field
->getValue();
$hashtags[] = array(
'target_id' => $tid,
);
$field
->setValue($hashtags);
}