i have a beforeSave hook for a custom entity i called , Areportingr. (No problem)
Areportingr has a many to one relationship with Contacts entity.
How can I get the emailaddress (Contacts) of an instance of a Areportingr and Contacts relationship?
My hook does not run when i insert the following block of code:
if (!$foreign->get('emailAddress')) {
}else{
$desctemp=$entity->get('description');
$entity->set("description", $desctemp);
}
the following is my hook definition:
public function beforeSave(Entity $entity, $foreign, array $options = array()){
....
Areportingr has a many to one relationship with Contacts entity.
How can I get the emailaddress (Contacts) of an instance of a Areportingr and Contacts relationship?
My hook does not run when i insert the following block of code:
if (!$foreign->get('emailAddress')) {
}else{
$desctemp=$entity->get('description');
$entity->set("description", $desctemp);
}
the following is my hook definition:
public function beforeSave(Entity $entity, $foreign, array $options = array()){
....
Comment