public static function Field::fromType in Little helpers 7.2
Same name and namespace in other branches
- 7 src/Field/Field.php \Drupal\little_helpers\Field\Field::fromType()
File
- src/
Field/ Field.php, line 40
Class
- Field
- OOP-wrapper for the data-structure used by field_*_field() functions.
Namespace
Drupal\little_helpers\FieldCode
public static function fromType($type, $name = NULL) {
$new = new static(array(
'field_name' => $name,
));
$new
->setType($type);
return $new;
}