Your IP : 3.144.200.28


Current Path : /var/www/axolotl/data/www/nn.axolotls.ru/bitrix/modules/crm/lib/filter/
Upload File :
Current File : /var/www/axolotl/data/www/nn.axolotls.ru/bitrix/modules/crm/lib/filter/entitysettings.php

<?php
namespace Bitrix\Crm\Filter;

abstract class EntitySettings extends Settings
{
	const FLAG_NONE = 0;

	/** @var int */
	protected $flags = 0;

	function __construct(array $params)
	{
		parent::__construct($params);

		$this->flags = isset($params['flags'])
			? (int)$params['flags'] : self::FLAG_NONE;
	}

	/**
	 * Get Entity Type ID.
	 * @return int
	 */
	abstract public function getEntityTypeID();

	/**
	 * Get User Field Entity ID.
	 * @return string
	 */
	abstract public function getUserFieldEntityID();

	/**
	 * Check if specified flag is enabled.
	 * @param int $flag Flag value.
	 * @return bool
	 */
	public function checkFlag($flag)
	{
		return ($this->flags & $flag) === $flag;
	}
}