Update
bool CIBlockType::Update( string ID, array arFields );
The method modifies the information block type parameters.
Parameters
Parameter | Description |
---|---|
ID | Information block type ID. |
arFields |
Array of pairs field=>value. Contains values of the information
block type fields. The array entry arFields["LANG"]
should contain an array of the language-dependent
parameters of information block type. |
Return Values
The method returns true on success. In case of failure, it returns false and sets the property LAST_ERROR to the error description.See Also
Example
<? $arFields = Array( 'SECTIONS'=>'Y', 'IN_RSS'=>'N', 'SORT'=>100, 'LANG'=>Array( 'en'=>Array( 'NAME'=>'Catalog', 'SECTION_NAME'=>'Sections', 'ELEMENT_NAME'=>'Products' ) ) ); $obBlocktype = new CIBlockType; $DB->StartTransaction(); $res = $obBlocktype->Update('catalog', $arFields); if(!$res) { $DB->Rollback(); echo 'Error: '.$obBlocktype->LAST_ERROR.'<br>'; } else $DB->Commit(); ?>
© «Bitrix24», 2001-2024