Example #1
0
 /**
  * Set value to input string represents file based on respective config for each field
  * @param string $field field name
  * @param File   $file
  *
  * @return void
  */
 public function setFile($field, $file)
 {
     $folder = $this->getFolderField($field);
     // if ($this->getFilePath($field, $file) != $file->getRealPath()) {
     //     return;
     // }
     $value = $this->isOnlyFileName() ? $file->getBasename() : $folder . DIRECTORY_SEPARATOR . $file->getBasename();
     $this->attributes[$field] = $value;
 }