Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
transformation.php
1<?php
2
4
6use Bitrix\Disk\AttachedObject;
7
9{
10 public static function getStatus($params = array())
11 {
12 $attachedIdList = (
13 is_array($params)
14 && !empty($params['attachedIdList'])
15 && is_array($params['attachedIdList'])
16 ? $params['attachedIdList']
17 : array()
18 );
19
20 if (
21 empty($params['attachedIdList'])
22 || !Loader::includeModule('disk')
23 || !method_exists('Bitrix\Disk\View\Video', 'isNeededLimitRightsOnTransformTime')
24 )
25 {
26 return false;
27 }
28
29 foreach($attachedIdList as $attachedId)
30 {
31 $attach = AttachedObject::getById($attachedId);
32 $attachFile = $attach->getFile();
33 if ($attachFile && $attachFile->getView()->isNeededLimitRightsOnTransformTime())
34 {
35 return true;
36 }
37 }
38
39 return false;
40 }
41}