1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CIBlockType

Открытые члены

 CheckFields ($arFields, $ID=false)
 Add ($arFields)
 Update ($ID, $arFields)
 getLastError ()

Открытые статические члены

static GetList ($arOrder=array("SORT"=> "ASC"), $arFilter=array())
static GetByID ($ID)
static GetByIDLang ($ID, $LID, $bFindAny=true)
static Delete ($ID)

Поля данных

string $LAST_ERROR = ''

Защищенные статические члены

static _GetCache ($ID)
static SetLang ($ID, $arLang)

Подробное описание

Class CIBlockType

Fields:

  • ID string(50) mandatory
  • SECTIONS bool optional default 'Y'
  • EDIT_FILE_BEFORE string(255) optional
  • EDIT_FILE_AFTER string(255) optional
  • IN_RSS bool optional default 'N'
  • SORT int optional default 500

См. определение в файле iblocktype.php строка 19

Методы

◆ _GetCache()

_GetCache ( $ID)
staticprotected

Returns cached version of the iblock type information.

Аргументы
string$ID
Возвращает
bool|array

@global CDatabase $DB

@global CCacheManager $CACHE_MANAGER

См. определение в файле iblocktype.php строка 164

◆ Add()

Add ( $arFields)

Creates new iblock type in the database. For arFields see CIBlockType class description.
In addition it may contain key "LANG" with and array of language depended on parameters.
For example: $arFields = array( "ID" => "test", "LANG" => array( "en" => array( "NAME" => "Test", "ELEMENT_NAME" => "Test element", "SECTION_NAME" => "Test section", ), ), );

Аргументы
array$arFields
Возвращает
bool

@global CDatabase $DB

См. определение в файле iblocktype.php строка 429

◆ CheckFields()

CheckFields ( $arFields,
$ID = false )

Helper internal function.
Checks correctness of the information. Called by Add and Update methods. List of errors returned by LAST_ERROR member variable.

Аргументы
array$arFields
bool$IDiblock type ID. false - if new one.
Возвращает
bool

@global CDatabase $DB

См. определение в файле iblocktype.php строка 363

◆ Delete()

Delete ( $ID)
static

Deletes iblock type including all iblocks.
When there is an error occured on iblock deletion it stops and returns false.

Аргументы
string$IDiblock type ID.
Возвращает
bool|CDBResult

@global CDatabase $DB

См. определение в файле iblocktype.php строка 329

◆ GetByID()

GetByID ( $ID)
static

Returns iblock type information by ID.

См. также
CIBlockType if (CModule::IncludeModule('iblock')) &#123; $rsType = CIBlockType\GetByID('test'); $arType = $rsType->GetNext(); if ($arType) &#123; echo '<pre>', htmlspecialcharsEx(print_r($arType, true)), '</pre>'; &#125; &#125;
Аргументы
string$IDiblock type ID
Возвращает
CDBResult

См. определение в файле iblocktype.php строка 220

◆ GetByIDLang()

GetByIDLang ( $ID,
$LID,
$bFindAny = true )
static

Returns iblock type information with additional language depended on messages.

Additional to CIBlockType language depended on fields:

  • NAME - Name of the type
  • SECTION_NAME - How sections are called
  • ELEMENT_NAME - How elements are called

if (CModule::IncludeModule('iblock')) &#123; $rsTypeLang = CIBlockType\GetByIDLang('test', 'en'); $arTypeLang = $rsTypeLang->GetNext(); if ($arTypeLang) &#123; echo '<pre>', htmlspecialcharsEx(print_r($arTypeLang, true)), '</pre>'; &#125; &#125;

Аргументы
string$IDiblock type ID
string$LIDlanguage ID
bool$bFindAnyForces strict search
Возвращает
array|bool

@global CDatabase $DB

См. определение в файле iblocktype.php строка 274

◆ getLastError()

getLastError ( )

Returns last errors.

Возвращает
string

См. определение в файле iblocktype.php строка 535

◆ GetList()

GetList ( $arOrder = array("SORT" => "ASC"),
$arFilter = array() )
static

@global CDatabase $DB

@global CCacheManager $CACHE_MANAGER

См. определение в файле iblocktype.php строка 53

◆ SetLang()

SetLang ( $ID,
$arLang )
staticprotected

Internal helper function which helps to store language depended on fields into database.

Аргументы
string$IDiblock type ID
array$arLanglanguage depended fields

@global CDatabase $DB

См. определение в файле iblocktype.php строка 495

◆ Update()

Update ( $ID,
$arFields )

Updates iblock type in the database.

$arFields is the same as for CIBlockType::Add method.

См. также
CIBlockType\Add
Аргументы
string$ID
array$arFields
Возвращает
bool

@global CDatabase $DB

См. определение в файле iblocktype.php строка 464

Поля

◆ $LAST_ERROR

string $LAST_ERROR = ''

См. определение в файле iblocktype.php строка 24


Объявления и описания членов класса находятся в файле: