• Модуль: controller
  • Путь к файлу: ~/bitrix/modules/controller/lib/authgrant.php
  • Класс: BitrixControllerAuthGrantTable
  • Вызов: AuthGrantTable::getMap
static function getMap()
{
	$connection = BitrixMainApplication::getConnection();
	$helper = $connection->getSqlHelper();
	return array(
		'ID' => array(
			'data_type' => 'integer',
			'primary' => true,
			'autocomplete' => true,
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_ID_FIELD'),
		),
		'TIMESTAMP_X' => array(
			'data_type' => 'datetime',
			'required' => true,
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_TIMESTAMP_X_FIELD'),
		),
		'GRANTED_BY' => array(
			'data_type' => 'integer',
			'required' => true,
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_GRANTED_BY_FIELD'),
		),
		'CONTROLLER_MEMBER_ID' => array(
			'data_type' => 'integer',
			'required' => true,
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_CONTROLLER_MEMBER_ID_FIELD'),
		),
		'GRANTEE_USER_ID' => array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_GRANTEE_USER_ID_FIELD'),
		),
		'GRANTEE_GROUP_ID' => array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_GRANTEE_GROUP_ID_FIELD'),
		),
		'ACTIVE' => array(
			'data_type' => 'boolean',
			'values' => array('N', 'Y'),
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_ACTIVE_FIELD'),
		),
		'SCOPE' => array(
			'data_type' => 'string',
			'required' => true,
			'validation' => array(__CLASS__, 'validateScope'),
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_SCOPE_FIELD'),
		),
		'DATE_START' => array(
			'data_type' => 'datetime',
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_DATE_START_FIELD'),
		),
		'DATE_END' => array(
			'data_type' => 'datetime',
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_DATE_END_FIELD'),
		),
		'NOTE' => array(
			'data_type' => 'string',
			'validation' => array(__CLASS__, 'validateNote'),
			'title' => Loc::getMessage('AUTH_GRANT_ENTITY_NOTE_FIELD'),
		),
		'CONTROLLER_MEMBER' => array(
			'data_type' => 'BitrixControllerMemberTable',
			'reference' => array('=this.CONTROLLER_MEMBER_ID' => 'ref.ID'),
		),
		'GRANTED' => array(
			'data_type' => 'BitrixMainUserTable',
			'reference' => array('=this.GRANTED_BY' => 'ref.ID'),
		),
		'GRANTED_NAME' => array(
			'data_type' => 'string',
			'expression' => array(
				$helper->getConcatFunction("'('", "%s"," ') '", "%s", "' '", "%s"),
				'GRANTED.LOGIN', 'GRANTED.NAME', 'GRANTED.LAST_NAME'
			),
		),
		'GRANTEE_USER' => array(
			'data_type' => 'BitrixMainUserTable',
			'reference' => array('=this.GRANTEE_USER_ID' => 'ref.ID'),
		),
		'GRANTEE_USER_NAME' => array(
			'data_type' => 'string',
			'expression' => array(
				$helper->getConcatFunction("'('", "%s"," ') '", "%s", "' '", "%s"),
				'GRANTEE_USER.LOGIN', 'GRANTEE_USER.NAME', 'GRANTEE_USER.LAST_NAME'
			),
		),
		'GRANTEE_GROUP' => array(
			'data_type' => 'BitrixMainGroupTable',
			'reference' => array('=this.GRANTEE_GROUP_ID' => 'ref.ID'),
		),
		'GRANTEE_GROUP_NAME' => array(
			'data_type' => 'string',
			'expression' => array(
				$helper->getConcatFunction("'['", "%s"," '] '", "%s"),
				'GRANTEE_GROUP.ID', 'GRANTEE_GROUP.NAME'
			),
		),
	);
}