public function getValue() { if (!$this->is_local && !$this->record_label && $this->rel_field != "") { $this->remote($this->rel_field, trim(strstr($this->rel_key, '.'), '.')); } parent::getValue(); if (count($this->local_options)) { $description_arr = array(); $this->fill_tags = ""; foreach ($this->options as $value => $description) { if (in_array($value, $this->values)) { $description_arr[] = $description; $row = new \stdClass(); $row->key = $value; $row->value = $description; $this->fill_tags .= "\n \$('#{$this->name}').tagsinput('add', " . json_encode($row) . ");"; } } $this->description = implode($this->separator, $description_arr); } elseif ($this->relation != null) { if ($this->is_refill) { $values = explode($this->serialization_sep, $this->value); $entity = get_class($this->relation->getRelated()); $related = $entity::whereIn($this->record_id, $values)->get(); } else { $related = $this->relation->get(); } $name = $this->rel_field; $key = $this->record_id; $this->fill_tags = ""; if (count($related)) { foreach ($related as $item) { $row = new \stdClass(); $row->{$key} = $item->{$key}; $row->{$name} = $item->{$name}; $this->fill_tags .= "\n \$('#{$this->name}').tagsinput('add', " . json_encode($row) . ");"; $description_arr[] = $item->{$name}; } $this->description = implode($this->separator, $description_arr); } } else { if ($this->value) { $values = explode($this->serialization_sep, $this->value); $name = $this->record_label; $key = $this->record_id; $this->fill_tags = ""; if (count($values)) { //var_dump($values); foreach ($values as $item) { $row = new \stdClass(); $row->{$key} = $item; $row->{$name} = $item; $this->fill_tags .= "\n \$('#{$this->name}').tagsinput('add', " . json_encode($row) . ");"; $description_arr[] = $item; } $this->description = implode($this->separator, $description_arr); } } } }
public function getValue() { parent::getValue(); if (\Request::isMethod('post') && !\Input::exists($this->name)) { $this->value = $this->unchecked_value; } $this->checked = (bool) ($this->value == $this->checked_value); }
public function getValue() { parent::getValue(); foreach ($this->options as $value => $description) { if ($this->value == $value) { $this->description = $description; } } }
public function getValue() { Field::getValue(); $this->values = explode($this->serialization_sep, $this->value); foreach ($this->values as $value) { $values[] = $this->isoDateToHuman($value); } if (isset($values)) { $this->value = implode($this->serialization_sep, $values); } }
function getValue() { parent::getValue(); if (count($this->local_options)) { foreach ($this->options as $value => $description) { if ($this->value == $value) { $this->description = $description; } } } }
public function getValue() { parent::getValue(); $this->values = explode($this->serialization_sep, $this->value); $description_arr = array(); foreach ($this->options as $value => $description) { if (in_array($value, $this->values)) { $description_arr[] = $description; } } $this->description = implode($this->separator, $description_arr); }
public function getValue() { if (!$this->is_local && !$this->record_label && $this->rel_field != "") { $this->remote($this->rel_field, preg_replace('#([a-z0-9_-]+\\.)?(.*)#i', '$2', $this->rel_key)); } parent::getValue(); if (count($this->local_options)) { foreach ($this->options as $value => $description) { if ($this->value == $value) { $this->description = $description; } } } }
public function getValue() { if (!$this->is_local && !$this->record_label && $this->rel_field != "") { $this->remote($this->rel_field, trim(strstr($this->rel_key, '.'), '.')); } parent::getValue(); if (count($this->local_options)) { foreach ($this->options as $value => $description) { if ($this->value == $value) { $this->description = $description; } } } }
function getValue() { parent::getValue(); $this->checked = (bool) ($this->value == $this->checked_value); }