Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
crmviewmanager.php
1
<?php
2
3
4
namespace
Bitrix\Rest\Integration
;
5
6
7
use
Bitrix\Main\Engine
;
8
use
Bitrix\Rest\Integration\View\Base
;
9
use
Bitrix\Rest\RestException
;
10
use \Bitrix\Crm\RestView;
11
use \Bitrix\Crm\Controller;
12
13
final
class
CrmViewManager
extends
ViewManager
14
{
20
public
function
getView
(
Engine
\
Controller
$controller)
21
{
22
if
($controller instanceof
Controller
\
Enum
)
23
{
24
$entity =
new
RestView\Enum();
25
}
26
elseif($controller instanceof
Controller
\OrderEntity)
27
{
28
$entity =
new
RestView\OrderEntity();
29
}
30
elseif($controller instanceof
Controller
\BuyerGroup)
31
{
32
$entity =
new
RestView\BuyerGroup();
33
}
34
else
35
{
36
throw
new
RestException
(
'Unknown object '
. get_class($controller));
37
}
38
39
return
$entity;
40
}
41
}
Bitrix\Catalog\Controller\Enum
Definition
enum.php:11
Bitrix\Rest\Integration\CrmViewManager
Definition
crmviewmanager.php:14
Bitrix\Rest\Integration\CrmViewManager\getView
getView(Engine\Controller $controller)
Definition
crmviewmanager.php:20
Bitrix\Rest\Integration\View\Base
Definition
base.php:16
Bitrix\Rest\Integration\ViewManager
Definition
viewmanager.php:11
Bitrix\Rest\OAuth\Engine
Definition
engine.php:16
Bitrix\Rest\RestException
Definition
restexception.php:6
Bitrix\Main\Engine
Definition
action.php:3
Bitrix\Rest\Integration
Definition
catalogviewmanager.php:4
Bitrix\Sender\Internals\QueryController
Definition
action.php:8
modules
rest
lib
integration
crmviewmanager.php
Создано системой
1.10.0