Manager::loadFromEntity

  1. Bitrix24 API (v. 23.675.0)
  2. vote
  3. Manager
  4. loadFromEntity
  • Модуль: vote
  • Путь к файлу: ~/bitrix/modules/vote/lib/attachment/manager.php
  • Класс: Bitrix\Vote\Attachment\Manager
  • Вызов: Manager::loadFromEntity
static function loadFromEntity(array $filter)
{
	$filter = array_change_key_case($filter, CASE_UPPER);
	if (empty($filter))
		throw new ArgumentNullException("filter");

	$return = array();
	$res = Attach::getData($filter);
	if (is_array($res))
	{
		foreach ($res as $attach)
		{
			$res = new Attach($attach[0]);
			$res->setVote($attach[1]["ID"]);
			$return[$attach[0]["ID"]] = $res;
		}
	}
	return $return;
}

Добавить комментарий