public function Field::setType in Little helpers 7
Same name and namespace in other branches
- 7.2 src/Field/Field.php \Drupal\little_helpers\Field\Field::setType()
Load default data for this field-type.
See also
File
- src/
Field/ Field.php, line 58
Class
- Field
- OOP-wrapper for the data-structure used by field_*_field() functions.
Namespace
Drupal\little_helpers\FieldCode
public function setType($type) {
$field_type = \field_info_field_types($type);
$this->settings += \field_info_field_settings($type);
$this->module = $field_type['module'];
$this->type = $type;
}