Example #1
0
 public function resolveFieldClass($field)
 {
     $fieldType = FieldSetProvider::getFieldType($field['type']);
     // If a particular fieldset is desired we will look for it in
     // the list of available sets and remove all others if it exits
     if (isset($field['fieldset'])) {
         $fieldSet = $field['fieldset'];
         if (array_key_exists($fieldSet, $fieldType)) {
             $fieldType = array($fieldSet => $fieldType[$fieldSet]);
         } else {
             throw new \Exception('Fieldset "' . $fieldSet . '" not available');
         }
     }
     $fieldClass = $this->registerFieldType($fieldType);
     return $fieldClass;
 }