Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- \Bitrix\Main\Loader::includeModule('timeman');
- use Bitrix\Timeman\Model\EntriesTable;
- $filter = array(
- '>DATE_START' => (new \Bitrix\Main\Type\DateTime())->setTime(0, 0, 0),
- array(
- 'LOGIC' => 'OR',
- '<DATE_FINISH' => (new \Bitrix\Main\Type\DateTime())->setTime(23, 55, 0),
- 'DATE_FINISH' => false
- )
- );
- $select = array(
- 'NAME' => 'USER.NAME',
- 'LAST_NAME' => 'USER.LAST_NAME',
- 'USER_ID'
- );
- $userRef = (
- new Bitrix\Main\ORM\Fields\Relations\Reference(
- 'USER',
- \Bitrix\Main\UserTable::class,
- \Bitrix\Main\ORM\Query\Join::on('this.USER_ID', 'ref.ID')
- )
- )->configureJoinType('inner');
- $dbEntries = EntriesTable::getList(array(
- 'runtime' => array(
- $userRef
- ),
- 'filter' => $filter,
- 'select' => $select
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement