• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/exchangeclientrequest.php
  • Класс: CDavExchangeClientRequest
  • Вызов: CDavExchangeClientRequest::CreateGetItemBody
public function CreateGetItemBody($itemId = null, $itemShape = "AllProperties", $arAdditionalExtendedProperties = array())
{
	$arMapTmp = [
		"idonly" => "IdOnly",
		"id_only" => "IdOnly",
		"allproperties" => "AllProperties",
		"all_properties" => "AllProperties"
	];
	$itemShapeLower = mb_strtolower($itemShape);
	if (array_key_exists($itemShapeLower, $arMapTmp))
	{
		$itemShape = $arMapTmp[$itemShapeLower];
	}
	else
	{
		$itemShape = "AllProperties";
	}

	$this->body  = "<"."?xml version="1.0" encoding="utf-8"?".">rn";
	$this->body .= "rn";
	$this->body .= " rn";
	$this->body .= "  rn";
	$this->body .= "   rn";
	$this->body .= "    ".$itemShape."rn";

	if (is_array($arAdditionalExtendedProperties) && !empty($arAdditionalExtendedProperties))
	{
		$this->body .= '' . "rn";

		foreach ($arAdditionalExtendedProperties as $arAdditionalExtendedProperty)
		{
			$this->body .= '     body .= ' ' . $probablyFieldName . '="' . $arAdditionalExtendedProperty[$probablyFieldName] . '"';
				}
			}

			$this->body .= " />rn";
		}

		$this->body .= '' . "rn";
	}

	$this->body .= "   rn";

	$this->body .= "   rn";

	if (!is_array($itemId))
	{
		$itemId = array("id" => $itemId);
	}

	$arKeys = array_keys($itemId);
	if (!empty($itemId) && $arKeys[0] . "!" !== "0!")
	{
		$itemId = array($itemId);
	}

	foreach ($itemId as $value)
	{
		$id = (isset($value["id"]) ? $value["id"] : $value["XML_ID"]);
		$changekey = (isset($value["changekey"]) ? $value["changekey"] : (isset($value["MODIFICATION_LABEL"]) ? $value["MODIFICATION_LABEL"] : null));

		$this->body .= "    body .= " ChangeKey="".htmlspecialcharsbx($changekey).""";
		}
		$this->body .= "/>rn";
	}

	$this->body .= "   rn";


	$this->body .= "  rn";
	$this->body .= " rn";
	$this->body .= "";
}