Lines Matching refs:value

8  * Holds the value for a single "cell". That value may be an array for multi value columns
18 protected $value;
29 /** @var bool is this a raw value only? */
36 * @param array|int|string $value
38 public function __construct(Column $column, $value)
41 $this->setValue($value);
58 throw new StructException('Accessing value of rawonly value forbidden');
60 return $this->value;
64 * Access the raw value
74 * Access the display value
81 throw new StructException('Accessing displayvalue of rawonly value forbidden');
87 * Access the compare value
94 throw new StructException('Accessing comparevalue of rawonly value forbidden');
100 * Allows overwriting the current value
102 * Cleans the value(s) of empties
104 * @param array|int|string $value
105 * @param bool $israw is the passed value a raw value? turns Value into rawonly
107 public function setValue($value, $israw = false)
112 if (!is_array($value)) {
113 $value = [$value];
117 $this->value = [];
123 foreach ($value as $val) {
130 $this->value[] = $val;
141 // make single value again
143 $this->value = (string)array_shift($this->value);
161 * Render the value using the given renderer and mode
163 * automativally picks the right mechanism depending on multi or single value
165 * values are only rendered when there is a value
174 if (count($this->value)) {
175 return $this->column->getType()->renderMultiValue($this->value, $R, $mode);
177 } elseif ($this->value !== '') {
178 return $this->column->getType()->renderValue($this->value, $R, $mode);
184 * Render this value as a tag-link in a struct cloud
195 $value = is_array($this->value) ? $this->value[0] : $this->value;
196 $this->column->getType()->renderTagCloudLink($value, $R, $mode, $page, $filterQuery, $weight, $showCount);
200 * Return the value editor for this value field
226 * Get a string representation of this value