Generated module and Person entity

Changed "published" status of entity to "enabled". Removed author field from display
This commit is contained in:
naomi
2018-04-04 12:59:01 +02:00
commit 4756074cf7
33 changed files with 1845 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
/**
* @file
* Contains person.page.inc.
*
* Page callback for Person entities.
*/
use Drupal\Core\Render\Element;
/**
* Prepares variables for Person templates.
*
* Default template: person.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function template_preprocess_person(array &$variables) {
// Fetch Person Entity Object.
$person = $variables['elements']['#person'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}