bool CIBlockProperty::Update( int ID, array arFields );
The method changes parameters of a property.
Parameter | Description |
---|---|
ID | Property ID. |
arFields |
An array of the format Array("field"=>"value",
...) containing values of the property
fields. Additionally, it can contain the field VALUES which is an array Array(array("VALUE"=>"value", "DEF"=>"default (Y/N)", "SORT"=>"sort weight"),...); this allows to set the selection options for the LIST properties. See the UpdateEnum function description for more information. |
<? $arFields = Array( "NAME" => "Colour", "ACTIVE" => "Y", "SORT" => "100", "CODE" => "color", "PROPERTY_TYPE" => "L", "IBLOCK_ID" => 11 ); $arFields["VALUES"][0] = Array( "VALUE" => "Red", "DEF" => "N", "SORT" => "100" } $arFields["VALUES"][1] = Array( "VALUE" => "Yellow", "DEF" => "N", "SORT" => "200" } $arFields["VALUES"][2] = Array( "VALUE" => "Green", "DEF" => "Y", "SORT" => "300" } $ibp = new CIBlockProperty; if(!$ibp->Update($ID, $arFields)) echo $ibp->LAST_ERROR; ?
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |