public static function EckEntityBundle::create in Entity Construction Kit (ECK) 8
Constructs a new entity object, without permanently saving it.
Parameters
array $values: (optional) An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
Return value
static The entity object.
Overrides EntityBase::create
1 call to EckEntityBundle::create()
- EckEntityTest::createEckEntityType in tests/
src/ Kernel/ EckEntityTest.php - Creates ECK entity type.
File
- src/
Entity/ EckEntityBundle.php, line 149
Class
- EckEntityBundle
- Defines the ECK entity bundle configuration entity.
Namespace
Drupal\eck\EntityCode
public static function create(array $values = []) {
$entity_type_manager = \Drupal::entityTypeManager();
$storage = $entity_type_manager
->getStorage('eck_entity_bundle');
return $storage
->create($values);
}