public static function Instance::fromField in Little helpers 7.2
Same name and namespace in other branches
- 7 src/Field/Instance.php \Drupal\little_helpers\Field\Instance::fromField()
1 call to Instance::fromField()
- Instance::fromNames in src/
Field/ Instance.php
File
- src/
Field/ Instance.php, line 41
Class
Namespace
Drupal\little_helpers\FieldCode
public static function fromField(Field $field, BundleInterface $bundle = NULL, $data = array()) {
$data = array(
'field' => $field,
'bundle' => $bundle,
) + $data;
$instance = new static($data);
return $instance;
}