public function createField()
{
$field = new \Ip\Form\Field\RepositoryFile(array('label' => $this->label, 'name' => $this->field, 'layout' => $this->layout, 'attributes' => $this->attributes, 'path' => $this->path));
if ($this->fileLimit !== null) {
$field->setFileLimit($this->fileLimit);
}
$field->setValue(json_decode($this->defaultValue));
return $field;
}