public function HostingFieldable::setEntityReference in Aegir Objects 7.3
Return the target of an entityreference field.
File
- traits/
HostingFieldable.inc, line 29 - The HostingFieldable trait.
Class
- HostingFieldable
- @file The HostingFieldable trait.
Code
public function setEntityReference($field, $value) {
return $this->node->{$field}[$this->node->language][0] = array(
'target_id' => $value,
'target_type' => 'node',
);
}