mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
entity render: options, html classes, corrections
note: span.chill-entity tag is replaced by section.chill-entity tag. because some cases are not valid html : * span.chill-entity > div * span.badge > div.chill-entity
This commit is contained in:
@@ -52,16 +52,22 @@ class PersonRender extends AbstractChillEntityRender
|
||||
*/
|
||||
public function renderBox($person, array $options): string
|
||||
{
|
||||
return $this->engine->render('@ChillPerson/Entity/person.html.twig',
|
||||
[
|
||||
$params = [
|
||||
'addAltNames' => $this->configAltNamesHelper->hasAltNames(),
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'hLevel' => $options['hLevel'] ?? 3,
|
||||
];
|
||||
dump($params);
|
||||
return
|
||||
$this->getDefaultOpeningBox('person') .
|
||||
$this->engine->render('@ChillPerson/Entity/person.html.twig', [
|
||||
'person' => $person,
|
||||
'addAltNames' => $this->configAltNamesHelper->hasAltNames(),
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'display' => $options['display'] ?? 'raw'
|
||||
]
|
||||
);
|
||||
'render' => $options['render'] ?? 'raw',
|
||||
'options' => $params
|
||||
]) .
|
||||
$this->getDefaultClosingBox();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user