Pool::toArray

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. Pool
  4. toArray
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/yandex/toloka/dto/pool.php
  • Класс: Bitrix\Sender\Integration\Yandex\Toloka\DTO\Pool
  • Вызов: Pool::toArray
public function toArray():array
{
	$resultArray = [
		'project_id'                      => $this->projectId,
		'private_name'                    => $this->privateName,
		'public_description'              => $this->publicDescription,
		'may_contain_adult_content'       => $this->mayContainAdultContent,
		'will_expire'                     => $this->willExpire,
		'reward_per_assignment'           => $this->rewardPerAssignment,
		'assignment_max_duration_seconds' => $this->assignmentMaxDurationSeconds,
		'auto_accept_solutions'           => $this->autoAcceptSolutions,
		'defaults'                        => $this->defaults->toArray(),
	];

	if(!empty($this->filter))
	{
		$resultArray['filter'] = [];
		$resultArray['filter']['and'] = [];
		foreach ($this->filter as $filter)
		{
			$resultArray['filter']['and'][] = $filter->toArray();
		}
	}

	return $resultArray;
}

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