@@ 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. |
@@ 322-337 (lines=16) @@ | ||
319 | * @param \stdClass $entity |
|
320 | * The entity object. |
|
321 | */ |
|
322 | protected function expandEntityProperties(\stdClass $entity) { |
|
323 | // The created field may come in as a readable date, rather than a |
|
324 | // timestamp. |
|
325 | if (isset($entity->created) && !is_numeric($entity->created)) { |
|
326 | $entity->created = strtotime($entity->created); |
|
327 | } |
|
328 | ||
329 | // Map human-readable node types to machine node types. |
|
330 | $types = \node_type_get_types(); |
|
331 | foreach ($types as $type) { |
|
332 | if ($entity->type == $type->name) { |
|
333 | $entity->type = $type->type; |
|
334 | continue; |
|
335 | } |
|
336 | } |
|
337 | } |
|
338 | ||
339 | /** |
|
340 | * {@inheritdoc} |