• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblock.php
  • Класс: CWebDavIblock
  • Вызов: CWebDavIblock::IsBpParamRequired
function IsBpParamRequired() // for template
{
	static $dataType = 'IsBpParamRequired';
	$result = 'N';

	if ($this->workflow == 'bizproc')
	{
		$result = $this->_dataCache($dataType);

		if ($result === false)
		{
			$arTemplateStates =
				CBPWorkflowTemplateLoader::GetDocumentTypeStates(
					$this->wfParams["DOCUMENT_TYPE"],
					CBPDocumentEventType::Create
				)
				+ CBPWorkflowTemplateLoader::GetDocumentTypeStates(
					$this->wfParams["DOCUMENT_TYPE"],
					CBPDocumentEventType::Edit
				);

			foreach ($arTemplateStates as $arTemplateState)
			{
				if (is_array($arTemplateState["TEMPLATE_PARAMETERS"]))
				{
					foreach ($arTemplateState["TEMPLATE_PARAMETERS"] as $res)
					{
						if (
							$res["Required"] == 1
							&& empty($res["Default"])
						)
						{
							$result = "Y";
							break;
						}
					}
					if ($result === 'Y')
						break;
				}
			}

			$this->_dataCache($dataType, $result);
		}
	}
	return ($result === 'Y');
}