mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
wip render box person thirdparty display bloc
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* Copyright (C) 2014-2020 , Champs Libres Cooperative SCRLFS,
|
||||
* Copyright (C) 2014-2020 , Champs Libres Cooperative SCRLFS,
|
||||
* <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -25,7 +25,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Symfony\Bridge\Twig\TwigEngine;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
class ThirdPartyRender extends AbstractChillEntityRender
|
||||
@@ -35,37 +35,36 @@ class ThirdPartyRender extends AbstractChillEntityRender
|
||||
* @var TwigEngine
|
||||
*/
|
||||
protected $templating;
|
||||
|
||||
|
||||
public function __construct(TwigEngine $templating)
|
||||
{
|
||||
$this->templating = $templating;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param ThirdParty $entity
|
||||
* @param array $options
|
||||
* @return string
|
||||
*/
|
||||
public function renderBox($entity, array $options): string
|
||||
{
|
||||
$params = \array_merge(
|
||||
[ 'with_valid_from' => true ],
|
||||
$options
|
||||
);
|
||||
|
||||
return
|
||||
$this->getDefaultOpeningBox('_3party').
|
||||
$this->templating->render('@ChillThirdParty/ThirdParty/_render.html.twig', [
|
||||
'contact' => $entity,
|
||||
'options' => $params
|
||||
$this->templating->render('@ChillThirdParty/Entity/thirdparty.html.twig', [
|
||||
'thirdparty' => $entity,
|
||||
'with_valid_from' => $options['with_valid_from'] ?? true,
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'display' => $options['display'] ?? 'raw',
|
||||
'options' => $options
|
||||
]).
|
||||
$this->getDefaultClosingBox();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param ThirdParty $entity
|
||||
* @param array $options
|
||||
* @return string
|
||||
|
Reference in New Issue
Block a user