3namespace Bitrix\Catalog\Controller;
5use Bitrix\Catalog\Access\ActionDictionary;
6use Bitrix\Catalog\CatalogIblockTable;
7use Bitrix\Main\Engine\CurrentUser;
8use Bitrix\Main\Engine\Response\DataType\Page;
10use Bitrix\Main\Result;
21 $row = $entityTable::getRow([
54 $this->addErrors($r->getErrors());
69 while (
$l = $r->fetch())
90 if(
$res->isSuccess() ==
false)
100 $r->addError(
new Error(
'Duplicate entry for key [iblockId]'));
105 $this->addErrors($r->getErrors());
110 return [
'CATALOG'=>$this->
get(
$fields[
'IBLOCK_ID'])];
122 \CCatalog::update($id,
$fields);
128 return [
'CATALOG'=>$this->
get($id)];
132 $this->addErrors($r->getErrors());
147 if ($ex = self::getApplication()->GetException())
148 $r->addError(
new Error($ex->GetString(), $ex->GetId()));
150 $r->addError(
new Error(
'delete catalog error'));
161 $this->addErrors($r->getErrors());
169 return $this->
get($id)[
"PRODUCT_IBLOCK_ID"] ?
true:
false;
177 protected function get($id)
179 return \CCatalog::GetByID($id);
188 if ($ex = self::getApplication()->GetException())
189 $r->addError(
new Error($ex->GetString(), $ex->GetId()));
191 $r->addError(
new Error(
'Validate catalog error'));
203 if ($ex = self::getApplication()->GetException())
204 $r->addError(
new Error($ex->GetString(), $ex->GetId()));
206 $r->addError(
new Error(
'Validate catalog error'));
217 $r->addError(
new Error(
'Catalog is offers'));
226 if(
$name ==
'isoffers')
232 $r = parent::checkPermissionEntity(
$name);
243 if (!$this->accessController->check(ActionDictionary::ACTION_CATALOG_SETTINGS_ACCESS))
256 $user = CurrentUser::get();
257 if(!
$user->canDoOperation(
'view_other_settings') && !
$user->canDoOperation(
'edit_other_settings'))
263 !$this->accessController->check(ActionDictionary::ACTION_CATALOG_READ)
264 && !$this->accessController->check(ActionDictionary::ACTION_CATALOG_SETTINGS_ACCESS)
267 $r->addError(
new Error(
'Access Denied', 200040300030));
checkModifyPermissionEntity()
checkReadPermissionEntity()
updateValidate(array $fields)
addValidate(array $fields)
updateAction($id, array $fields)
checkPermissionEntity($name, $arguments=[])
listAction($select=[], $filter=[], $order=[], $start=0)
getErrorModifyAccessDenied()
getErrorReadAccessDenied()
static CheckFields($ACTION, &$arFields, $ID=0)
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)