|
@@ -106,7 +106,7 @@ class File extends Field implements UploadFieldInterface
|
|
|
*/
|
|
|
public function setRelation(array $options = [])
|
|
|
{
|
|
|
- $this->options['formData']['_relation'] = [$options['relation'], $options['key']];
|
|
|
+ $this->options['formData']['_relation'] = [$options['relation'], $options['key'] ?? null];
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
@@ -237,18 +237,4 @@ class File extends Field implements UploadFieldInterface
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * Set key for error message.
|
|
|
- *
|
|
|
- * @param string|array $key
|
|
|
- * @return $this
|
|
|
- */
|
|
|
- public function setErrorKey($key)
|
|
|
- {
|
|
|
- parent::setErrorKey($key);
|
|
|
- $this->options['formData']['upload_column'] = $key;
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
}
|