• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/service/agent/worktimeagentmanager.php
  • Класс: BitrixTimemanServiceAgentWorktimeAgentManager
  • Вызов: WorktimeAgentManager::deleteAgentById
public function deleteAgentById($agentId)
{
	$dataClass = $this->getAgentDataClass();
	$agent = $dataClass::query()
		->addSelect('ID')
		->where('MODULE_ID', 'timeman')
		->where('ID', $agentId)
		->exec()
		->fetch();
	if ($agent)
	{
		return CAgent::delete($agentId);
	}
	return true;
}