protected function Page::getEntry in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.2 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.4 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.5 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.6 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.7 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 8.8 modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 10.3.x modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 10.0.x modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
- 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/Page.php \Drupal\social_demo\Plugin\DemoContent\Page::getEntry()
Makes an array with data of an entity.
Parameters
array $item: Array with items.
Return value
array Returns an array.
Overrides DemoNode::getEntry
File
- modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ Page.php, line 58
Class
- Page
- Page Plugin for demo content.
Namespace
Drupal\social_demo\Plugin\DemoContentCode
protected function getEntry(array $item) {
$entry = parent::getEntry($item);
$entry['field_content_visibility'] = $item['field_content_visibility'];
// Load image by uuid and set to node.
if (!empty($item['image'])) {
$entry['field_page_image'] = $this
->prepareImage($item['image'], $item['image_alt']);
}
if (!empty($item['alias'])) {
$entry['path'] = [
'alias' => $item['alias'],
];
}
return $entry;
}