19 private $listsPermission;
23 $this->entityRight = $entityRight;
24 $this->rightParam = $rightParam;
26 $this->listsPermission = $this->getListsPermission();
28 $this->entityRight->setListsPermission($this->listsPermission);
42 if ($this->listsPermission < 0)
44 switch ($this->listsPermission)
46 case \CListPermissions::WRONG_IBLOCK_TYPE:
47 $this->errorCollection->setError(
52 case \CListPermissions::WRONG_IBLOCK:
53 $this->errorCollection->setError(
58 case \CListPermissions::LISTS_FOR_SONET_GROUP_DISABLED:
59 $this->errorCollection->setError(
65 $this->errorCollection->setError(
75 if (method_exists($this->entityRight, $entityMethod))
77 if (!$this->entityRight->$entityMethod())
79 $this->errorCollection->setError(
87 $this->errorCollection->setError(
102 private function getListsPermission()
104 return \CListPermissions::checkAccess(
105 $this->rightParam->getUser(),
106 $this->rightParam->getIblockTypeId(),
107 $this->rightParam->getIblockId(),
108 $this->rightParam->getSocnetGroupId()
114 return $this->listsPermission;
static getMessage($code, $replace=null, $language=null)
trait ErrorableImplementation