Loading src/UnicaenIndicateur/View/Helper/IndicateurViewHelper.php +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,14 @@ use UnicaenIndicateur\Service\Indicateur\IndicateurServiceAwareTrait; class IndicateurViewHelper extends AbstractHelper { use IndicateurServiceAwareTrait; /** * @param Indicateur $indicateur * @param array $options * @return \Laminas\View\Helper\Partial|string * * La clef $options['ViewHelper'] permet d'indiquer le ViewHelperpour réaliser l'affichage * attention celui-ci doit implementer l'interface ItemViewHelperInterface */ public function __invoke(Indicateur $indicateur, array $options = []) { /** @var PhpRenderer $view */ Loading src/UnicaenIndicateur/View/Helper/partial/indicateur.phtml +5 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ use UnicaenIndicateur\Entity\Db\Indicateur; * @var array $options */ $viewhelper = 'defaultItem'; if (isset($options['ViewHelper'])) $viewhelper = $options['ViewHelper'] ?> <div> Loading @@ -16,12 +19,12 @@ use UnicaenIndicateur\Entity\Db\Indicateur; id="indicateur_<?php echo $indicateur->getId(); ?>" class="datatable table table-condensed table-hover" > <?php echo $this->defaultItem($indicateur)->getHeader($data); ?> <?php echo $this->{$viewhelper}($indicateur)->getHeader($data); ?> <tbody> <?php $nbLine = count($data[1]); ?> <?php for($position = 0 ; $position < count($data[1]) ; $position++) { echo $this->defaultItem($indicateur)->getItem($data, $position); echo $this->{$viewhelper}($indicateur)->getItem($data, $position); } ?> </tbody> Loading Loading
src/UnicaenIndicateur/View/Helper/IndicateurViewHelper.php +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,14 @@ use UnicaenIndicateur\Service\Indicateur\IndicateurServiceAwareTrait; class IndicateurViewHelper extends AbstractHelper { use IndicateurServiceAwareTrait; /** * @param Indicateur $indicateur * @param array $options * @return \Laminas\View\Helper\Partial|string * * La clef $options['ViewHelper'] permet d'indiquer le ViewHelperpour réaliser l'affichage * attention celui-ci doit implementer l'interface ItemViewHelperInterface */ public function __invoke(Indicateur $indicateur, array $options = []) { /** @var PhpRenderer $view */ Loading
src/UnicaenIndicateur/View/Helper/partial/indicateur.phtml +5 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ use UnicaenIndicateur\Entity\Db\Indicateur; * @var array $options */ $viewhelper = 'defaultItem'; if (isset($options['ViewHelper'])) $viewhelper = $options['ViewHelper'] ?> <div> Loading @@ -16,12 +19,12 @@ use UnicaenIndicateur\Entity\Db\Indicateur; id="indicateur_<?php echo $indicateur->getId(); ?>" class="datatable table table-condensed table-hover" > <?php echo $this->defaultItem($indicateur)->getHeader($data); ?> <?php echo $this->{$viewhelper}($indicateur)->getHeader($data); ?> <tbody> <?php $nbLine = count($data[1]); ?> <?php for($position = 0 ; $position < count($data[1]) ; $position++) { echo $this->defaultItem($indicateur)->getItem($data, $position); echo $this->{$viewhelper}($indicateur)->getItem($data, $position); } ?> </tbody> Loading