Ejemplo n.º 1
0
 /**
  * @param FieldType $fieldType Document field object.
  * @param mixed $value Field value.
  * @param string $toTypeClass Type class manager name.
  * @return null|mixed
  */
 public static function convertTo(FieldType $fieldType, $value, $toTypeClass)
 {
     if (is_array($value) && isset($value['VALUE'])) {
         $value = $value['VALUE'];
     }
     $value = (string) $value;
     return BaseType\String::convertTo($fieldType, $value, $toTypeClass);
 }
Ejemplo n.º 2
0
 /**
  * @param FieldType $fieldType Document field object.
  * @param mixed $value Field value.
  * @param string $toTypeClass Type class manager name.
  * @return null|mixed
  */
 public static function convertTo(FieldType $fieldType, $value, $toTypeClass)
 {
     if (is_subclass_of($toTypeClass, '\\Bitrix\\Iblock\\BizprocType\\UserTypeProperty')) {
         return $value;
     }
     if (is_array($value) && isset($value['VALUE'])) {
         $value = $value['VALUE'];
     }
     $value = (string) $value;
     return BaseType\String::convertTo($fieldType, $value, $toTypeClass);
 }