|
@@ 94-97 (lines=4) @@
|
| 91 |
|
* error will be in the exception. |
| 92 |
|
*/ |
| 93 |
|
public function nodeAlter($node, $values) { |
| 94 |
|
if (empty($node) || !isset($node->nid)) { |
| 95 |
|
var_dump(array_keys(get_object_vars($node))); |
| 96 |
|
throw new \Exception(sprintf("%s::%s: Node was empty or had no id", get_class($this), __FUNCTION__)); |
| 97 |
|
} |
| 98 |
|
// Assign type (really, bundle) to values so that expansion functions will |
| 99 |
|
// work properly. |
| 100 |
|
$values->type = $node->type; |
|
@@ 158-161 (lines=4) @@
|
| 155 |
|
* error will be in the exception. |
| 156 |
|
*/ |
| 157 |
|
public function userAlter($user, $values) { |
| 158 |
|
if (empty($user) || !isset($user->uid)) { |
| 159 |
|
var_dump(array_keys(get_object_vars($user))); |
| 160 |
|
throw new \Exception(sprintf("%s::%s: User was empty or had no id", get_class($this), __FUNCTION__)); |
| 161 |
|
} |
| 162 |
|
// Attempt to decipher any fields that may be specified. |
| 163 |
|
$this->expandEntityFields('user', $values); |
| 164 |
|
foreach ($values as $k => $v) { |