mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 18:04:33 +02:00
Renamed the base DBElement classes to AbstractDBElement to comply with symfony recommendations.
This commit is contained in:
parent
da72f5b3ec
commit
594c694ee0
62 changed files with 203 additions and 203 deletions
|
@ -24,8 +24,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\EntityListeners;
|
||||
|
||||
use App\Entity\Base\DBElement;
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Entity\UserSystem\Group;
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Services\UserCacheKeyGenerator;
|
||||
|
@ -50,10 +50,10 @@ class TreeCacheInvalidationListener
|
|||
* @ORM\PostPersist()
|
||||
* @ORM\PostRemove()
|
||||
*/
|
||||
public function invalidate(DBElement $element, LifecycleEventArgs $event): void
|
||||
public function invalidate(AbstractDBElement $element, LifecycleEventArgs $event): void
|
||||
{
|
||||
//If an element was changed, then invalidate all cached trees with this element class
|
||||
if ($element instanceof StructuralDBElement) {
|
||||
if ($element instanceof AbstractStructuralDBElement) {
|
||||
$secure_class_name = str_replace('\\', '_', get_class($element));
|
||||
$this->cache->invalidateTags([$secure_class_name]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue