Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
lock.php
1<?php
3
5
6class Lock extends Element
7{
8 public function lockAction()
9 {
10 $param = $this->getParamFromRequest();
11 $params = $param->getParams();
12
13 $this->checkPermission($param, ElementRight::EDIT);
14 if ($this->getErrors())
15 {
16 $this->addErrors($this->getErrors());
17 return null;
18 }
19
20 \CIBlockElement::WF_Lock($params["ELEMENT_ID"], false);
21 }
22
23 public function unLockAction()
24 {
25 $param = $this->getParamFromRequest();
26 $params = $param->getParams();
27
28 $this->checkPermission($param, ElementRight::EDIT);
29 if ($this->getErrors())
30 {
31 $this->addErrors($this->getErrors());
32 return null;
33 }
34
35 \CIBlockElement::WF_UnLock($params["ELEMENT_ID"], false);
36 }
37}
checkPermission(Param $param, $permission)
Definition element.php:47