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:
2021-07-28 11:39:27 +02:00
parent df3d32c653
commit 57a8b49f49
9 changed files with 141 additions and 112 deletions

View File

@@ -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();
}
/**