We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 1221-1233 (lines=13) @@ | ||
1218 | ||
1219 | ||
1220 | // iti pune valorile pe field-uri la EDIT |
|
1221 | public function addFieldsValue() |
|
1222 | { |
|
1223 | if ($this->entry) |
|
1224 | { |
|
1225 | $fields = !empty($this->update_fields) ? 'update_fields' : 'fields'; |
|
1226 | ||
1227 | foreach ($this->{$fields} as $key => $field) |
|
1228 | { |
|
1229 | if (array_key_exists($field['name'], $this->relations) && $this->relations[$field['name']]['pivot']) $this->{$fields}[$key]['value'] = $this->entry->{$this->relations[$field['name']]['name']}()->lists($this->relations[$field['name']]['model']->getKeyName())->toArray(); |
|
1230 | else $this->{$fields}[$key]['value'] = $this->entry->{$field['name']}; |
|
1231 | } |
|
1232 | } |
|
1233 | } |
|
1234 | ||
1235 | public function add($entity, $field) |
|
1236 | { |
@@ 473-485 (lines=13) @@ | ||
470 | }, $this->getColumns()); |
|
471 | } |
|
472 | ||
473 | private function addFieldsValue() |
|
474 | { |
|
475 | if ($this->item) |
|
476 | { |
|
477 | $fields = !empty($this->updateFields) ? 'updateFields' : 'fields'; |
|
478 | ||
479 | foreach ($this->{$fields} as $key => $field) |
|
480 | { |
|
481 | if (array_key_exists($field['name'], $this->relations) && $this->relations[$field['name']]['pivot']) $this->{$fields}[$key]['value'] = $this->item->{$this->relations[$field['name']]['name']}()->lists($this->relations[$field['name']]['model']->getKeyName())->toArray(); |
|
482 | else $this->{$fields}[$key]['value'] = $this->item->{$field['name']}; |
|
483 | } |
|
484 | } |
|
485 | } |
|
486 | ||
487 | private function add($entity, $field) |
|
488 | { |