45 \
Magento\Captcha\Helper\Adminhtml\Data $adminHelper,
50 $this->_adminHelper = $adminHelper;
62 foreach ($this->_storeManager->getWebsites() as
$website) {
84 $imageDirectory = $this->_mediaDirectory->getRelativePath(
$helper->getImgDir(
$website));
85 foreach ($this->_mediaDirectory->read($imageDirectory) as $filePath) {
86 if ($this->_mediaDirectory->isFile($filePath)
87 && pathinfo($filePath, PATHINFO_EXTENSION) ==
'png' 88 && $this->_mediaDirectory->stat($filePath)[
'mtime'] < $expire
90 $this->_mediaDirectory->delete($filePath);
_deleteExpiredImagesForWebsite(\Magento\Captcha\Helper\Data $helper, \Magento\Store\Model\Website $website=null, \Magento\Store\Model\Store $store=null)
__construct(\Magento\Captcha\Helper\Data $helper, \Magento\Captcha\Helper\Adminhtml\Data $adminHelper, \Magento\Framework\Filesystem $filesystem, \Magento\Store\Model\StoreManager $storeManager)