| @@ 293-308 (lines=16) @@ | ||
| 290 | * @param \stdClass $entity |
|
| 291 | * The entity object. |
|
| 292 | */ |
|
| 293 | protected function expandEntityProperties(\stdClass $entity) { |
|
| 294 | // The created field may come in as a readable date, rather than a |
|
| 295 | // timestamp. |
|
| 296 | if (isset($entity->created) && !is_numeric($entity->created)) { |
|
| 297 | $entity->created = strtotime($entity->created); |
|
| 298 | } |
|
| 299 | ||
| 300 | // Map human-readable node types to machine node types. |
|
| 301 | $types = node_get_types(); |
|
| 302 | foreach ($types as $type) { |
|
| 303 | if ($entity->type == $type->name) { |
|
| 304 | $entity->type = $type->type; |
|
| 305 | continue; |
|
| 306 | } |
|
| 307 | } |
|
| 308 | } |
|
| 309 | ||
| 310 | /** |
|
| 311 | * Load vocabularies, optional by VIDs. |
|
| @@ 263-278 (lines=16) @@ | ||
| 260 | * @param \stdClass $entity |
|
| 261 | * The entity object. |
|
| 262 | */ |
|
| 263 | protected function expandEntityProperties(\stdClass $entity) { |
|
| 264 | // The created field may come in as a readable date, rather than a |
|
| 265 | // timestamp. |
|
| 266 | if (isset($entity->created) && !is_numeric($entity->created)) { |
|
| 267 | $entity->created = strtotime($entity->created); |
|
| 268 | } |
|
| 269 | ||
| 270 | // Map human-readable node types to machine node types. |
|
| 271 | $types = \node_type_get_types(); |
|
| 272 | foreach ($types as $type) { |
|
| 273 | if ($entity->type == $type->name) { |
|
| 274 | $entity->type = $type->type; |
|
| 275 | continue; |
|
| 276 | } |
|
| 277 | } |
|
| 278 | } |
|
| 279 | ||
| 280 | /** |
|
| 281 | * {@inheritdoc} |
|