• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/update/update200300.php
  • Класс: BitrixImconnectorUpdateUpdate200300
  • Вызов: Update200300::loadCurrentStatus
public function loadCurrentStatus()
{
	$status = Option::get(self::$moduleId, self::OPTION_NAME, '');
	$status = ($status !== '' ? @unserialize($status, ['allowed_classes' => false]) : []);
	$status = (is_array($status) ? $status : []);

	if (empty($status))
	{
		$count = StatusConnectorsTable::getList([
			'select' => ['ID', 'LINE'],
			'filter' => [
				'=CONNECTOR' => self::$connectorId,
			],
			'count_total' => true
		])->getCount();

		$status = [
			'lastId' => 0,
			'number' => 0,
			'count' => $count,
		];
	}
	return $status;
}