...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/internals/runtime/task.php
- Класс: BitrixTasksInternalsRunTimeTask
- Вызов: Task::getAccessCheck
static function getAccessCheck(array $parameters) { $result = array(); $parameters = static::checkParameters($parameters); if(!User::isSuper($parameters['USER_ID'])) { $query = static::getAccessCheckSql($parameters); $rtName = isset($parameters['NAME']) && (string)$parameters['NAME'] !== '' ? (string)$parameters['NAME'] : 'ACCESS' ; $rfName = isset($parameters['REF_FIELD']) && (string)$parameters['REF_FIELD'] !== '' ? (string)$parameters['REF_FIELD'] : 'ID' ; $sql = $query['sql']; // make virtual entity to be able to join it $entity = EntityBase::compileEntity('TasksAccessCheck'.randString().'Table', array( new EntityIntegerField('TASK_ID', array( 'primary' => true )) ), array( 'table_name' => '('.preg_replace('#/*[^(/*)(*/)]**/#', '', $sql).')', // remove possible comments, orm does not like them )); $result[] = new EntityReferenceField( $rtName, $entity, array( '=this.'.$rfName => 'ref.TASK_ID', ), array('join_type' => 'inner') ); } return array('runtime' => $result); }