Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
Context.php
1
<?php
2
3
namespace
Bitrix\Bizproc\Runtime\Starter
;
4
5
use
Bitrix\Bizproc
;
6
use
Bitrix\Main\Engine\CurrentUser
;
7
8
class
Context
9
{
10
protected
const
FACE_WEB
=
'web'
;
11
protected
const
FACE_MOBILE
=
'mob'
;
12
protected
const
FACE_REST
=
'rest'
;
13
protected
const
FACE_BIZPROC
=
'bizproc'
;
14
15
protected
string
$face
= self::FACE_WEB;
16
protected
string
$moduleId
=
'bizproc'
;
17
protected
int
$userId
;
18
protected
bool
$isManual
=
false
;
19
20
public
function
setFace
(
string
$face): self
21
{
22
$this->face = $face;
23
24
return
$this;
25
}
26
27
public
function
setModuleId
(
string
$moduleId): self
28
{
29
$this->moduleId = $moduleId;
30
31
return
$this;
32
}
33
34
public
function
setUserId
(
int
$userId): self
35
{
36
$this->userId = $userId;
37
38
return
$this;
39
}
40
41
public
function
setIsManual
(): self
42
{
43
$this->isManual =
true
;
44
$this->
setUserIdFromCurrent
();
45
46
return
$this;
47
}
48
49
protected
function
setUserIdFromCurrent
(): self
50
{
51
$id = CurrentUser::get()->getId();
52
$this->
setUserId
((
int
)$id);
53
54
return
$this;
55
}
56
57
public
function
isManualOperation
(): bool
58
{
59
return
$this->isManual;
60
}
61
}
Bitrix\Bizproc\Runtime\Starter\Context
Definition
Context.php:9
Bitrix\Bizproc\Runtime\Starter\Context\$moduleId
string $moduleId
Definition
Context.php:16
Bitrix\Bizproc\Runtime\Starter\Context\FACE_REST
const FACE_REST
Definition
Context.php:12
Bitrix\Bizproc\Runtime\Starter\Context\FACE_WEB
const FACE_WEB
Definition
Context.php:10
Bitrix\Bizproc\Runtime\Starter\Context\setModuleId
setModuleId(string $moduleId)
Definition
Context.php:27
Bitrix\Bizproc\Runtime\Starter\Context\$isManual
bool $isManual
Definition
Context.php:18
Bitrix\Bizproc\Runtime\Starter\Context\setUserIdFromCurrent
setUserIdFromCurrent()
Definition
Context.php:49
Bitrix\Bizproc\Runtime\Starter\Context\$userId
int $userId
Definition
Context.php:17
Bitrix\Bizproc\Runtime\Starter\Context\setFace
setFace(string $face)
Definition
Context.php:20
Bitrix\Bizproc\Runtime\Starter\Context\FACE_MOBILE
const FACE_MOBILE
Definition
Context.php:11
Bitrix\Bizproc\Runtime\Starter\Context\setIsManual
setIsManual()
Definition
Context.php:41
Bitrix\Bizproc\Runtime\Starter\Context\$face
string $face
Definition
Context.php:15
Bitrix\Bizproc\Runtime\Starter\Context\setUserId
setUserId(int $userId)
Definition
Context.php:34
Bitrix\Bizproc\Runtime\Starter\Context\FACE_BIZPROC
const FACE_BIZPROC
Definition
Context.php:13
Bitrix\Bizproc\Runtime\Starter\Context\isManualOperation
isManualOperation()
Definition
Context.php:57
Bitrix\Main\Engine\CurrentUser
Definition
currentuser.php:8
Bitrix\Bizproc\Runtime\Starter
Definition
Context.php:3
Bitrix\Bizproc
modules
bizproc
lib
Runtime
Starter
Context.php
Создано системой
1.10.0