You are here

protected function DemoNode::getEntry in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  2. 8.2 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  3. 8.3 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  4. 8.4 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  5. 8.5 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  6. 8.6 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  7. 8.7 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  8. 8.8 modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  9. 10.3.x modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  10. 10.0.x modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  11. 10.1.x modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()
  12. 10.2.x modules/custom/social_demo/src/DemoNode.php \Drupal\social_demo\DemoNode::getEntry()

Makes an array with data of an entity.

Parameters

array $item: Array with items.

Return value

array Returns an array.

Overrides DemoContent::getEntry

5 calls to DemoNode::getEntry()
Book::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Book.php
Makes an array with data of an entity.
DemoNode::createContent in modules/custom/social_demo/src/DemoNode.php
Creates content.
Event::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Event.php
Makes an array with data of an entity.
Page::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Page.php
Makes an array with data of an entity.
Topic::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Topic.php
Makes an array with data of an entity.
4 methods override DemoNode::getEntry()
Book::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Book.php
Makes an array with data of an entity.
Event::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Event.php
Makes an array with data of an entity.
Page::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Page.php
Makes an array with data of an entity.
Topic::getEntry in modules/custom/social_demo/src/Plugin/DemoContent/Topic.php
Makes an array with data of an entity.

File

modules/custom/social_demo/src/DemoNode.php, line 146

Class

DemoNode
Class DemoNode.

Namespace

Drupal\social_demo

Code

protected function getEntry(array $item) {
  $entry = [
    'uuid' => $item['uuid'],
    'langcode' => $item['langcode'],
    'created' => $item['created'],
    'uid' => $item['uid'],
    'title' => $item['title'],
    'type' => $item['type'],
    'body' => [
      'value' => $this
        ->checkMentionOrLinkByUuid($item['body']),
      'format' => 'basic_html',
    ],
  ];
  return $entry;
}