An extend and finalized version of DamienHarper/auditor#61
Closes:
DamienHarper/auditor#15
DamienHarper/auditor-bundle#304
DamienHarper/auditor#61
This pull request allows users to create extra columns in their audit tables. This is useful when You need to group audit events with an external parameter for easy retrieval later on.
Adds the options "extra_fields" and "extra_indices" to the Configuration object:
In this case, the App\Entity\Demo needs to have a property called extra_column, and the bundle will automaticly pick it up (doesn't need to be a doctrine property, just an object property) (see: src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php:132)
class App\Entity\Demo
{
private ?string $extraColumn = null;
public function getExtraColumn(): ?string
{
return $this->extraColumn;
}
public function setExtraColumn(?string $extraColumn): void
{
$this->extraColumn = $extraColumn;
}
}
An extend and finalized version of DamienHarper/auditor#61
Closes:
This pull request allows users to create extra columns in their audit tables. This is useful when You need to group audit events with an external parameter for easy retrieval later on.
Adds the options "extra_fields" and "extra_indices" to the Configuration object:
Adds the ability to query the audit table on the configured extra_indices via filters, eg.
The field is automaticly detected by using the Symfony Property Accessor
In this case, the
App\Entity\Demo
needs to have a property calledextra_column
, and the bundle will automaticly pick it up (doesn't need to be a doctrine property, just an object property) (see: src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php:132)