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 }
/** * @param array $fields Data. */ protected function __construct(array $fields = array()) { parent::__construct($fields); $this->calculatedFields = new Internals\Fields(); }
protected function __construct(array $fields = array()) { parent::__construct($fields); }