|
@@ 98-101 (lines=4) @@
|
| 95 |
|
* An object with field/value parameters. |
| 96 |
|
*/ |
| 97 |
|
public function nodeAlter($node, $values) { |
| 98 |
|
if (empty($node) || !isset($node->nid)) { |
| 99 |
|
var_dump(array_keys(get_object_vars($node))); |
| 100 |
|
throw new \Exception(sprintf("%s::%s: Node was empty or had no id", get_class($this), __FUNCTION__)); |
| 101 |
|
} |
| 102 |
|
// Assign type (really, bundle) to values so that expansion functions will |
| 103 |
|
// work properly. |
| 104 |
|
$values->type = $node->type; |
|
@@ 165-168 (lines=4) @@
|
| 162 |
|
* An object with field/value parameters. |
| 163 |
|
*/ |
| 164 |
|
public function userAlter($user, $values) { |
| 165 |
|
if (empty($user) || !isset($user->uid)) { |
| 166 |
|
var_dump(array_keys(get_object_vars($user))); |
| 167 |
|
throw new \Exception(sprintf("%s::%s: User was empty or had no id", get_class($this), __FUNCTION__)); |
| 168 |
|
} |
| 169 |
|
// Attempt to decipher any fields that may be specified. |
| 170 |
|
$this->expandEntityFields('user', $values); |
| 171 |
|
foreach ($values as $k => $v) { |