Loading config/module.config.php +1 −1 Original line number Diff line number Diff line <?php use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; use UnicaenUtilisateur\ORM\Event\Listeners\HistoriqueListener; use UnicaenUtilisateur\ORM\Event\Listeners\HistoriqueListenerFactory; use UnicaenUtilisateur\View\Helper\RoleViewHelper; Loading src/UnicaenUtilisateur/Entity/Db/HistoriqueAwareInterface.php +2 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,6 @@ interface HistoriqueAwareInterface * @return $this */ public function dehistoriser(); public function deniereModification(): string; } No newline at end of file src/UnicaenUtilisateur/Entity/Db/HistoriqueAwareTrait.php +14 −0 Original line number Diff line number Diff line Loading @@ -266,4 +266,18 @@ trait HistoriqueAwareTrait return true; } public function deniereModification() : string { if ($this->getHistoDestruction() !== null) { return "Historisation ". $this->getHistoDestruction()->format('d/m/Y à H:i:s') ." par ". $this->getHistoDestructeur()->getDisplayName() ; } if ($this->getHistoModification() !== null) { return "Modification ". $this->getHistoModification()->format('d/m/Y à H:i:s') ." par ". $this->getHistoModificateur()->getDisplayName() ; } if ($this->getHistoCreation() !== null) { return "Création ". $this->getHistoCreation()->format('d/m/Y à H:i:s') ." par ". $this->getHistoCreateur()->getDisplayName() ; } return "Aucune donnée d'historisation"; } } No newline at end of file Loading
config/module.config.php +1 −1 Original line number Diff line number Diff line <?php use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; use UnicaenUtilisateur\ORM\Event\Listeners\HistoriqueListener; use UnicaenUtilisateur\ORM\Event\Listeners\HistoriqueListenerFactory; use UnicaenUtilisateur\View\Helper\RoleViewHelper; Loading
src/UnicaenUtilisateur/Entity/Db/HistoriqueAwareInterface.php +2 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,6 @@ interface HistoriqueAwareInterface * @return $this */ public function dehistoriser(); public function deniereModification(): string; } No newline at end of file
src/UnicaenUtilisateur/Entity/Db/HistoriqueAwareTrait.php +14 −0 Original line number Diff line number Diff line Loading @@ -266,4 +266,18 @@ trait HistoriqueAwareTrait return true; } public function deniereModification() : string { if ($this->getHistoDestruction() !== null) { return "Historisation ". $this->getHistoDestruction()->format('d/m/Y à H:i:s') ." par ". $this->getHistoDestructeur()->getDisplayName() ; } if ($this->getHistoModification() !== null) { return "Modification ". $this->getHistoModification()->format('d/m/Y à H:i:s') ." par ". $this->getHistoModificateur()->getDisplayName() ; } if ($this->getHistoCreation() !== null) { return "Création ". $this->getHistoCreation()->format('d/m/Y à H:i:s') ." par ". $this->getHistoCreateur()->getDisplayName() ; } return "Aucune donnée d'historisation"; } } No newline at end of file