Example #1
0
 /**
  * Takes information from the FieldCollection and uses it in this display
  * 
  * @param \Feeld\FieldCollection\FieldCollectionInterface $field
  * @throws \Wellid\Exception\DataType
  */
 public function informAboutStructure(DisplayDataSourceInterface $field)
 {
     if (!$field instanceof \Feeld\FieldCollection\FieldCollectionInterface) {
         throw new \Wellid\Exception\DataType('field', 'FieldCollectionInterface', $field);
     }
     $this->dataSource = $field;
     if (count($field->getFieldsByDataType('Feeld\\DataType\\File')) > 0) {
         $this->setAttribute('enctype', 'multipart/form-data');
     }
 }