mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 02:38:50 +02:00
Log when elements are created, edited or removed.
This commit is contained in:
parent
9f5a4ddf95
commit
eb071b1780
7 changed files with 213 additions and 0 deletions
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\LogSystem;
|
||||
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
|
@ -33,6 +34,13 @@ class ElementCreatedLogEntry extends AbstractLogEntry
|
|||
{
|
||||
protected $typeString = 'element_created';
|
||||
|
||||
public function __construct(AbstractDBElement $new_element)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->level = self::LEVEL_INFO;
|
||||
$this->setTargetElement($new_element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the instock when the part was created.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue