コード例 #1
0
ファイル: propertyvalue.php プロジェクト: DarneoStudio/bitrix
 protected function __construct(array $property = null, array $value = null, array $relation = null)
 {
     if (!$property && !$value) {
         throw new SystemException('invalid arguments', 0, __FILE__, __LINE__);
     }
     if ($property) {
         if (is_array($property['SETTINGS'])) {
             $property += $property['SETTINGS'];
             unset($property['SETTINGS']);
         }
     } else {
         $property = array('TYPE' => 'STRING', 'PROPS_GROUP_ID' => 0, 'NAME' => $value['NAME'], 'CODE' => $value['CODE']);
     }
     if (!$value) {
         $value = array('ORDER_PROPS_ID' => $property['ID'], 'NAME' => $property['NAME'], 'CODE' => $property['CODE']);
     }
     if (!empty($relation)) {
         $property['RELATION'] = $relation;
     }
     switch ($property['TYPE']) {
         case 'ENUM':
             if ($propertyId = $property['ID']) {
                 $property['OPTIONS'] = static::loadOptions($propertyId);
             }
             break;
         case 'FILE':
             if ($defaultValue =& $property['DEFAULT_VALUE']) {
                 $defaultValue = Input\File::loadInfo($defaultValue);
             }
             if ($orderValue =& $value['VALUE']) {
                 $orderValue = Input\File::loadInfo($orderValue);
             }
             break;
     }
     $this->property = $property;
     $this->savedValue = Input\File::getValue($property, $value['VALUE']);
     parent::__construct($value);
     //TODO field
 }
コード例 #2
0
 /**
  * @param array $fields				Data.
  */
 protected function __construct(array $fields = array())
 {
     parent::__construct($fields);
     $this->calculatedFields = new Internals\Fields();
 }
コード例 #3
0
 protected function __construct(array $fields = array())
 {
     parent::__construct($fields);
 }