public function WebhookConfig::__construct in Webhooks 8
Constructs an Entity object.
Parameters
array $values: An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
string $entity_type: The type of the entity to create.
Overrides ConfigEntityBase::__construct
File
- src/
Entity/ WebhookConfig.php, line 158
Class
- WebhookConfig
- Defines the Webhook entity.
Namespace
Drupal\webhooks\EntityCode
public function __construct(array $values, $entity_type) {
parent::__construct($values, $entity_type);
if (isset($values['events']) && is_string($values['events'])) {
$this->events = unserialize($values['events']);
}
}