Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
textfield.php
1<?php
10
12
20{
22 protected $long = false;
23
32 function __construct($name, $parameters = array())
33 {
34 parent::__construct($name, $parameters);
35
36 $this->long = isset($parameters['long']) && (bool)$parameters['long'];
37 }
38
44 public function configureLong($long = true)
45 {
46 $this->long = (bool)$long;
47 return $this;
48 }
49
53 public function isLong()
54 {
55 return $this->long;
56 }
57
64 public function convertValueFromDb($value)
65 {
66 return $this->getConnection()->getSqlHelper()->convertFromDbText($value);
67 }
68
75 public function convertValueToDb($value)
76 {
77 if ($value instanceof SqlExpression)
78 {
79 return $value;
80 }
81
82 return $value === null && $this->is_nullable
83 ? $value
84 : $this->getConnection()->getSqlHelper()->convertToDbText($value);
85 }
86
87 public function isValueEmpty($value)
88 {
89 if ($this->isSerialized() && is_array($value))
90 {
91 return false;
92 }
93
94 return parent::isValueEmpty($value);
95 }
96}
__construct($name, $parameters=array())
Definition textfield.php:32