19 $iblockId = static::resolveIblockId($iblock);
26 if (!isset(self::$entityInstance[$iblockId]))
28 $className =
'Section'.$iblockId.
'Table';
29 $entityName =
"\\Bitrix\\Iblock\\".$className;
30 $referenceName =
'Bitrix\Iblock\Section'.$iblockId;
32 namespace Bitrix\Iblock;
33 class '.$className.
' extends \Bitrix\Iblock\SectionTable
35 public static function getUfId()
37 return "IBLOCK_'.$iblockId.
'_SECTION";
40 public static function getMap()
42 $fields = parent::getMap();
43 $fields["PARENT_SECTION"] = array(
44 "data_type" => "'.$referenceName.
'",
45 "reference" => array("=this.IBLOCK_SECTION_ID" => "ref.ID"),
50 public static function setDefaultScope($query)
52 return $query->where("IBLOCK_ID", '.$iblockId.
');
56 self::$entityInstance[$iblockId] = $entityName;
59 return self::$entityInstance[$iblockId];