This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace Esun\Wiki\Model\Config\Backend;
use Magento\Config\Model\Config\Backend\Image;
class BannerImage extends Image
{
/**
* @return string[]
*/
protected function _getAllowedExtensions()
{
return ['jpg', 'jpeg', 'gif', 'png', 'webp'];
}
public function afterSave()
{
$result = parent::afterSave();
$this->cleanPageCaches();
return $result;
}
public function afterDelete()
{
$result = parent::afterDelete();
$this->cleanPageCaches();
return $result;
}
private function cleanPageCaches(): void
{
$this->cacheTypeList->cleanType('block_html');
$this->cacheTypeList->cleanType('full_page');
}
}