public static function SocialApi::create in Social API 8.2
Same name and namespace in other branches
- 3.x src/Entity/SocialApi.php \Drupal\social_api\Entity\SocialApi::create()
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
File
- src/
Entity/ SocialApi.php, line 18
Class
- SocialApi
- Defines a base class for Social API content entities.
Namespace
Drupal\social_api\EntityCode
public static function create(array $values = []) {
if (isset($values['token'])) {
$values['token'] = static::encryptToken($values['token']);
}
return parent::create($values);
}