• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/businesssuite/utils/queueeventhandler.php
  • Класс: BitrixSeoBusinessSuiteUtilsQueueEventHandler
  • Вызов: QueueEventHandler::setClientId
private function setClientId($clientId) : self
{
	if(!$this->hasErrors())
	{
		if(isset($clientId,$this->service,$this->type) && is_int($clientId))
		{
			$authAdapter = $this->service::getAuthAdapter($this->type);
			if($this->service instanceof IMultiClientService && $authAdapter->canUseMultipleClients())
			{
				$this->service->setClientId($clientId);
			}
			if($authAdapter->hasAuth())
			{
				$this->clientId = $clientId;
				return $this;
			}
		}
		$this->errorCollection->setError(new MainError("client has no auth"));
	}
	return $this;
}