• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/Sitemap/Job.php
  • Класс: BitrixSeoSitemapJob
  • Вызов: Job::__construct
protected function __construct(int $sitemapId)
{
	$this->sitemapId = $sitemapId;

	// init from table
	$job = self::getDataBySitemap($sitemapId);
	if ($job)
	{
		$this->id = (int)$job['ID'];
		$this->status = $job['STATUS'];
		$this->statusMessage = $job['STATUS_MESSAGE'];
		$this->step = (int)$job['STEP'];
		$this->state = $job['STATE'] ?? [];

		if (!self::checkSitemapExists($sitemapId))
		{
			$this->finish();

			throw new SystemException('Sitemap for current job is not exists.');
		}
	}
	else
	{
		throw new SystemException('Job for current sitemap is not exists.');
	}
}