Filter::__construct

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Filter
  4. __construct
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/widget/filter.php
  • Класс: Bitrix\Crm\Widget\Filter
  • Вызов: Filter::__construct
public function __construct(array $params)
{
	$periodTypeID = isset($params['periodType']) ? $params['periodType'] : FilterPeriodType::UNDEFINED;

	$this->setPeriodTypeID($periodTypeID);
	$this->setYear(isset($params['year']) ? (int)$params['year'] : 1970);
	$this->setQuarter(isset($params['quarter']) ? (int)$params['quarter'] : 1);
	$this->setMonth(isset($params['month']) ? (int)$params['month'] : 1);

	if($periodTypeID === FilterPeriodType::BEFORE)
	{
		if(isset($params['end']) && $params['end'] instanceof Date)
		{
			$this->setEnd($params['end']);
		}
	}

	$this->setResponsibleIDs(isset($params['responsibleIDs']) && is_array($params['responsibleIDs'])
		? $params['responsibleIDs'] : array());
	$this->setExtras(isset($params['extras']) && is_array($params['extras'])
		? $params['extras'] : array());
}

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