1. Go to this page and download the library: Download kosmosafive/bitrix-db library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public static function getIndexConfigurationCollection(): ConfigurationCollection
{
return new ConfigurationCollection(static::class)
->add(['ENTITY_TYPE'])
->add(['ENTITY_TYPE', 'SECTION_ID']);
}
public static function getConstraintCollection(): ConstraintCollection
{
return new ConstraintCollection()
->add(new Unique('user_entity', 'USER_ID', 'ENTITY_ID'));
}