14 class Sitemap extends \Magento\Framework\App\Config\Value
54 \
Magento\Framework\
Data\Collection\AbstractDb $resourceCollection =
null,
58 $this->_runModelPath = $runModelPath;
59 $this->_configValueFactory = $configValueFactory;
69 $time = $this->
getData(
'groups/generate/fields/time/value');
70 $frequency = $this->
getData(
'groups/generate/fields/frequency/value');
75 $frequency == \Magento\Cron\Model\Config\Source\Frequency::CRON_MONTHLY ?
'1' :
'*',
77 $frequency == \Magento\Cron\Model\Config\Source\Frequency::CRON_WEEKLY ?
'1' :
'*',
80 $cronExprString = join(
' ', $cronExprArray);
83 $this->_configValueFactory->create()->load(
84 self::CRON_STRING_PATH,
89 self::CRON_STRING_PATH
91 $this->_configValueFactory->create()->load(
92 self::CRON_MODEL_PATH,
99 }
catch (\Exception $e) {
100 throw new \Exception(
__(
'We can\'t save the cron expression.'));
102 return parent::afterSave();
getData($key='', $index=null)
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\App\Config\ValueFactory $configValueFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, $runModelPath='', array $data=[])