24 lines
507 B
PHP
24 lines
507 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\MultiLocaleTranslation\Model;
|
|
|
|
use Magento\Framework\App\ResourceConnection;
|
|
|
|
class LogCleaner
|
|
{
|
|
private const TABLE_NAME = 'esun_localetranslation_log';
|
|
|
|
public function __construct(private readonly ResourceConnection $resourceConnection)
|
|
{
|
|
}
|
|
|
|
public function clearAll(): int
|
|
{
|
|
return $this->resourceConnection->getConnection()->delete(
|
|
$this->resourceConnection->getTableName(self::TABLE_NAME)
|
|
);
|
|
}
|
|
}
|