• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/integration/ui/entityselector/projectprovider.php
  • Класс: BitrixSocialnetworkIntegrationUIEntitySelectorProjectProvider
  • Вызов: ProjectProvider::__construct
public function __construct(array $options = [])
{
	parent::__construct();

	if (isset($options['project']) && is_bool($options['project']))
	{
		$this->options['project'] = $options['project'];
	}

	if (isset($options['extranet']) && is_bool($options['extranet']))
	{
		$this->options['extranet'] = $options['extranet'];
	}

	if (isset($options['landing']) && is_bool($options['landing']))
	{
		$this->options['landing'] = $options['landing'];
	}

	if (isset($options['features']) && is_array($options['features']))
	{
		$this->options['features'] = $options['features'];
	}

	$this->options['fillRecentTab'] = null; // auto
	if (isset($options['fillRecentTab']) && is_bool($options['fillRecentTab']))
	{
		$this->options['fillRecentTab'] = $options['fillRecentTab'];
	}

	$this->options['createProjectLink'] = null; // auto
	if (isset($options['createProjectLink']) && is_bool($options['createProjectLink']))
	{
		$this->options['createProjectLink'] = $options['createProjectLink'];
	}

	if (isset($options['projectId']))
	{
		if (is_array($options['projectId']))
		{
			$this->options['projectId'] = $options['projectId'];
		}
		elseif (is_string($options['projectId']) || is_int($options['projectId']))
		{
			$this->options['projectId'] = (int)$options['projectId'];
		}
	}
	elseif (isset($options['!projectId']))
	{
		if (is_array($options['!projectId']))
		{
			$this->options['!projectId'] = $options['!projectId'];
		}
		elseif (is_string($options['!projectId']) || is_int($options['!projectId']))
		{
			$this->options['!projectId'] = (int)$options['!projectId'];
		}
	}
}