public static function Flexslider::create in Flex Slider 8.2
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 Flexslider::create()
- FlexsliderTest::testOptionSetCrud in tests/
src/ Functional/ FlexsliderTest.php - Test managing the optionset.
File
- src/
Entity/ Flexslider.php, line 100
Class
- Flexslider
- Defines the Flexslider entity.
Namespace
Drupal\flexslider\EntityCode
public static function create(array $values = []) {
$flexslider = parent::create($values);
// Merge options with default options.
$default_options = FlexsliderDefaults::defaultOptions();
$flexslider
->setOptions($flexslider
->getOptions() + $default_options);
return $flexslider;
}