@@ 91-94 (lines=4) @@ | ||
88 | * An object with field/value parameters. |
|
89 | */ |
|
90 | public function nodeAlter($node, $values) { |
|
91 | if (empty($node) || !isset($node->nid)) { |
|
92 | var_dump(array_keys(get_object_vars($node))); |
|
93 | throw new \Exception(sprintf("%s::%s: Node was empty or had no id", get_class($this), __FUNCTION__)); |
|
94 | } |
|
95 | // Assign type (really, bundle) to values so that expansion functions will |
|
96 | // work properly. |
|
97 | $values->type = $node->type; |
|
@@ 151-154 (lines=4) @@ | ||
148 | * An object with field/value parameters. |
|
149 | */ |
|
150 | public function userAlter($user, $values) { |
|
151 | if (empty($user) || !isset($user->uid)) { |
|
152 | var_dump(array_keys(get_object_vars($user))); |
|
153 | throw new \Exception(sprintf("%s::%s: User was empty or had no id", get_class($this), __FUNCTION__)); |
|
154 | } |
|
155 | // Attempt to decipher any fields that may be specified. |
|
156 | $this->expandEntityFields('user', $values); |
|
157 | foreach ($values as $k => $v) { |