/** * @return array */ protected function getList() { if ($this->_list !== null) { return $this->_list; } $cache = $this->getCache(); $cId = get_class($this) . '_list'; if (!$cache || ($this->_list = $cache->get($cId)) === false) { $this->_list = []; $res = \CIblock::GetList([], $this->filter); $iblocksIds = []; while ($ob = $res->Fetch()) { $arItem = []; foreach ($this->select as $field) { if (!isset($ob[$field])) { continue; } $arItem[$field] = $ob[$field]; } $this->_list[$ob['ID']] = $arItem; } if (in_array('PROPERTIES', $this->select) && !empty($this->_list)) { $pRes = \CIBlockProperty::GetList(['sort' => 'asc'], []); while ($pOb = $pRes->Fetch()) { if (!isset($this->_list[$pOb['IBLOCK_ID']])) { continue; } $this->_list[$pOb['IBLOCK_ID']]['PROPERTIES'][] = $pOb; } } if ($cache) { $cache->set($cId, $this->_list, $this->cacheTime); } } return $this->_list; }
private function CheckIblock() { if ($arIblock = CIblock::GetList(array(), array("CODE" => $this->ModuleIblockCode))->Fetch()) { $this->arResult["INSTALLATION"]["IBLOCK_INSTALL"] = false; $this->arResult["INSTALLATION"]["IBLOCK_ID"] = $arIblock["ID"]; } }
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/ws.projectsettings/prolog.php"; /* @var $APPLICATION CMain */ if ($APPLICATION->GetGroupRight("ws.projectsettings") == "D") { $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); } #--- save fields --- if ($fields = $_REQUEST['fields']) { WS_PSettings::clearAll(); foreach ($fields as $fName => $fData) { WS_PSettings::setupField($fData); } } #--- view fields --- if (CModule::IncludeModule('iblock')) { $iblocks = array(); $rsIblock = CIblock::GetList(null, array('ACTIVE' => 'Y')); while ($arIblock = $rsIblock->fetch()) { $iblocks[$arIblock['ID']] = $arIblock['NAME']; } } $groups = array(); $rsUserGroups = CGroup::GetList($ugBy = 'name', $ugOrder = 'asc', array('ACTIVE' => 'Y')); while ($arUGroup = $rsUserGroups->fetch()) { $groups[$arUGroup['ID']] = $arUGroup['NAME']; } $tab = new CAdminTabControl('WS_ProgectSettings_tab', array(array('TAB' => GetMessage('ws_product_settings_page_title'), 'DIV' => 'edit1'))); $APPLICATION->SetTitle(GetMessage('ws_product_settings_page_title')); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; CJSCore::Init(array('ws_progectssettings_fields')); $jsParams = array('fields' => array(), 'curUri' => $APPLICATION->GetCurPage(), 'newFieldButton' => 'ws_project_settings_add_field_button', 'toogleSimCodesButton' => 'ws_project_settings_toogle_sim_codes_button', 'submitButton' => 'ws_project_settings_save_button', 'defaultButton' => 'ws_project_settings_default_button', 'cancelButton' => 'ws_project_settings_cancel_button', 'types' => array(WS_PSettings::FIELD_TYPE_NUMERIC => GetMessage('ws_projectsettings_field_type_number'), WS_PSettings::FIELD_TYPE_STRING => GetMessage('ws_projectsettings_field_type_string'), WS_PSettings::FIELD_TYPE_LIST => GetMessage('ws_projectsettings_field_type_list'), WS_PSettings::FIELD_TYPE_SIGN => GetMessage('ws_projectsettings_field_type_sign'), WS_PSettings::FIELD_TYPE_USER => GetMessage('ws_projectsettings_field_type_user'), WS_PSettings::FIELD_TYPE_USER_GROUP => GetMessage('ws_projectsettings_field_type_user_group'), WS_PSettings::FIELD_TYPE_IBLOCK => GetMessage('ws_projectsettings_field_type_iblock')), 'variants' => array(WS_PSettings::FIELD_TYPE_IBLOCK => $iblocks, WS_PSettings::FIELD_TYPE_USER_GROUP => $groups), 'customLists' => array()); $typeBuildEvents = GetModuleEvents("ws.projectsettings", "OnBuildTypes");
} $userPropValue = $userProp; $arExcludedProperties = array('LOGIN', 'PASSWORD', 'EMAIL', 'UF_STATE_FIRST', 'UF_STATE_LAST', 'UF_1C'); foreach ($arExcludedProperties as $prop) { unset($userPropValue[$prop]); } $userPropValue = array_keys($userPropValue); $arIBlockType = array("-" => ''); $rsIBlockType = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y")); while ($arr = $rsIBlockType->Fetch()) { if ($ar = CIBlockType::GetByIDLang($arr["ID"], LANGUAGE_ID)) { $arIBlockType[$arr["ID"]] = "[" . $arr["ID"] . "] " . $ar["NAME"]; } } if ($arCurrentValues['IBLOCK_TYPE'] && $arCurrentValues['IBLOCK_TYPE'] != '-') { $rsIBlock = CIblock::GetList(array('SORT' => 'ASC'), array('TYPE' => $arCurrentValues['IBLOCK_TYPE'])); while ($arIBlock = $rsIBlock->Fetch()) { $arIBLockList[$arIBlock['ID']] = $arIBlock['NAME']; } } $arUGroupsEx = array(); $dbUGroups = CGroup::GetList($by = "c_sort", $order = "asc"); while ($arUGroups = $dbUGroups->Fetch()) { $arUGroupsEx[$arUGroups["ID"]] = $arUGroups["NAME"]; } $bLDAP = CModule::IncludeModule('ldap'); if ($bLDAP) { $dbRes = CLDAPServer::GetList(); $arLDAPServers = array('' => GetMessage('CP_BCI1_LDAP_SERVER_CHOOSE')); while ($arRes = $dbRes->Fetch()) { $arLDAPServers[$arRes['ID']] = $arRes['NAME'];
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("blog")) { return false; } if (!CModule::IncludeModule("iblock")) { return false; } if (!CModule::IncludeModule("idea")) { return false; } $arCurrentValues = is_array($arCurrentValues) ? $arCurrentValues : array(); //IB Idea category $arIb = array(); $oRes = CIblock::GetList(array("IBLOCK_ID" => "ASC", "NAME" => "DESC"), array('ACTIVE' => 'Y')); while ($arRes = $oRes->Fetch()) { $arIb[$arRes["ID"]] = '(' . $arRes["IBLOCK_TYPE_ID"] . ') ' . $arRes["NAME"]; } //Default Idea Status $arUFStatus = array(); $arStatusList = CIdeaManagment::getInstance()->Idea()->GetStatusList(); foreach ($arStatusList as $Status) { $arUFStatus[$Status["ID"]] = $Status["VALUE"]; } //Blog URL $arBlog = array(); $dbBlog = CBlog::GetList(array("NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "URL")); while ($Blog = $dbBlog->Fetch()) { $arBlog[$Blog["URL"]] = $Blog["NAME"]; }