class RngEventType in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 3.x src/Entity/RngEventType.php \Drupal\rng\Entity\RngEventType
Defines the event type entity.
Plugin annotation
@ConfigEntityType(
id = "rng_event_type",
label = @Translation("Event type"),
handlers = {
"list_builder" = "\Drupal\rng\Lists\EventTypeListBuilder",
"form" = {
"add" = "Drupal\rng\Form\EventTypeForm",
"edit" = "Drupal\rng\Form\EventTypeForm",
"delete" = "Drupal\rng\Form\EventTypeDeleteForm",
"event_access_defaults" = "Drupal\rng\Form\EventTypeAccessDefaultsForm",
"event_default_messages" = "Drupal\rng\Form\EventTypeDefaultMessagesListForm",
"field_mapping" = "Drupal\rng\Form\EventTypeFieldMappingForm",
}
},
admin_permission = "administer event types",
config_prefix = "rng_event_type",
entity_keys = {
"id" = "id",
"label" = "id"
},
links = {
"edit-form" = "/admin/structure/rng/event_types/manage/{rng_event_type}/edit",
"delete-form" = "/admin/structure/rng/event_types/manage/{rng_event_type}/delete",
"event-access-defaults" = "/admin/structure/rng/event_types/manage/{rng_event_type}/access_defaults",
"field-mapping" = "/admin/structure/rng/event_types/manage/{rng_event_type}/field_mapping",
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\rng\Entity\RngEventType implements EventTypeInterface
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of RngEventType
3 files declare their use of RngEventType
- RngEventTypeEntityTest.php in tests/
src/ Kernel/ RngEventTypeEntityTest.php - RngEventTypeTest.php in src/
Tests/ RngEventTypeTest.php - RngTestTrait.php in src/
Tests/ RngTestTrait.php
File
- src/
Entity/ RngEventType.php, line 43
Namespace
Drupal\rng\EntityView source
class RngEventType extends ConfigEntityBase implements EventTypeInterface {
/**
* The machine name of this event config.
*
* Inspired by two part-ID's from \Drupal\field\Entity\FieldStorageConfig.
*
* Config will compute to rng.event.{entity_type}.{bundle}
*
* entity_type and bundle are duplicated in file name and config.
*
* @var string
*/
protected $id;
/**
* The ID of the event entity type.
*
* Matches entities with this entity type.
*
* @var string
*/
protected $entity_type;
/**
* The ID of the event bundle type.
*
* Matches entities with this bundle.
*
* @var string
*/
protected $bundle;
/**
* Mirror update permissions.
*
* The operation to mirror from the parent entity. For example, if the user
* has permission to do 'update' operation on the event entity and you want
* to mirror it. You should set this to 'update'.
*
* @var string
*/
public $mirror_operation_to_event_manage;
/**
* Allow event managers to customize default rules.
*
* @var bool
*/
public $custom_rules = TRUE;
/**
* Registrant type for new registrants associated with this event type.
*
* @var string
*/
protected $default_registrant;
/**
* Whether or not registrants should be allowed to be added registrations
* without any other identity entity.
*
* @var bool
*/
protected $allow_anon_registrants;
/**
* Whether or not matching field data should be sync'd with identities when
* a registrant is saved.
*
* @var bool
*/
protected $auto_sync_registrants;
/**
* Whether or not to automatically attach registrants to user identities by
* email.
*
* @var bool
*/
protected $auto_attach_users;
/**
* An email field on the registrant to use to sync to users.
*
* @var string
*/
protected $registrant_email_field;
protected $event_start_date_field;
protected $event_end_date_field;
/**
* Types of people types allowed to be associated with this event type.
*
* @var array
*/
protected $people_types = [];
/**
* Default messages configured for this event type.
*
* @var array
*/
protected $default_messages = [];
/**
* Fields to add to event bundles.
*
* @var array
*/
public $fields = [
EventManagerInterface::FIELD_REGISTRATION_TYPE,
EventManagerInterface::FIELD_REGISTRATION_GROUPS,
EventManagerInterface::FIELD_STATUS,
EventManagerInterface::FIELD_WAIT_LIST,
EventManagerInterface::FIELD_REGISTRANTS_CAPACITY,
EventManagerInterface::FIELD_CAPACITY_CONFIRMED_ONLY,
EventManagerInterface::FIELD_EMAIL_REPLY_TO,
EventManagerInterface::FIELD_ALLOW_DUPLICATE_REGISTRANTS,
];
/**
* {@inheritdoc}
*/
public function getEventEntityTypeId() {
return $this->entity_type;
}
/**
* {@inheritdoc}
*/
public function setEventEntityTypeId($entity_type) {
$this->entity_type = $entity_type;
return $this;
}
/**
* {@inheritdoc}
*/
public function getEventBundle() {
return $this->bundle;
}
/**
* {@inheritdoc}
*/
public function setEventBundle($bundle) {
$this->bundle = $bundle;
return $this;
}
/**
* {@inheritdoc}
*/
public function getEventManageOperation() {
return $this->mirror_operation_to_event_manage;
}
/**
* {@inheritdoc}
*/
public function setEventManageOperation($permission) {
$this->mirror_operation_to_event_manage = $permission;
return $this;
}
/**
* {@inheritdoc}
*/
public function getAllowCustomRules() {
return $this->custom_rules;
}
/**
* {@inheritdoc}
*/
public function setAllowCustomRules($allow) {
$this->custom_rules = $allow;
return $this;
}
/**
* {@inheritdoc}
*/
public function getDefaultRegistrantType() {
return $this->default_registrant;
}
/**
* {@inheritdoc}
*/
public function getDefaultMessages() {
return $this->default_messages;
}
/**
* {@inheritdoc}
*/
public function setDefaultMessages($messages) {
$this->default_messages = $messages;
return $this;
}
/**
* {@inheritdoc}
*/
public function canIdentityTypeCreate($entity_type, $bundle) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
return !empty($this->people_types[$key]['create']);
}
/**
* {@inheritdoc}
*/
public function setIdentityTypeCreate($entity_type, $bundle, $enabled) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
$this->people_types[$key]['create'] = $enabled;
return $this;
}
/**
* {@inheritdoc}
*/
public function getIdentityTypeEntityFormMode($entity_type, $bundle) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
return !empty($this->people_types[$key]['entity_form_mode']) ? $this->people_types[$key]['entity_form_mode'] : 'default';
}
/**
* {@inheritdoc}
*/
public function getIdentityTypeEntityFormModes() {
$result = [];
foreach ($this->people_types as $people_type) {
$required_keys = [
'entity_type',
'bundle',
'entity_form_mode',
];
// Ensure keys exist.
if (count($required_keys) === count(array_intersect_key(array_flip($required_keys), $people_type))) {
$entity_type = $people_type['entity_type'];
$bundle = $people_type['bundle'];
$result[$entity_type][$bundle] = $people_type['entity_form_mode'];
}
}
return $result;
}
/**
* {@inheritdoc}
*/
public function setIdentityTypeEntityFormMode($entity_type, $bundle, $form_mode) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
$this->people_types[$key]['entity_form_mode'] = $form_mode;
return $this;
}
/**
* {@inheritdoc}
*/
public function canIdentityTypeReference($entity_type, $bundle) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
return !empty($this->people_types[$key]['existing']);
}
/**
* {@inheritdoc}
*/
public function setIdentityTypeReference($entity_type, $bundle, $enabled) {
$key = $this
->getIdentityTypeKey($entity_type, $bundle);
$this->people_types[$key]['existing'] = $enabled;
return $this;
}
/**
* Get the array key of the people type.
*
* @param string $entity_type
* The identity entity type ID.
* @param string $bundle
* The identity bundle.
* @param bool $create_key
* Will initialise the array key.
*
* @return int|false
* The array key, or FALSE if it does not exist.
*/
protected function getIdentityTypeKey($entity_type, $bundle, $create_key = TRUE) {
if (isset($this->people_types)) {
$pairs = $this->people_types;
foreach ($pairs as $k => $pair) {
if ($pair['entity_type'] == $entity_type && $pair['bundle'] == $bundle) {
return $k;
}
}
}
if ($create_key) {
// Create if it doesn't exist.
$next_key = count($this->people_types) + 1;
$this->people_types[$next_key] = [
'entity_type' => $entity_type,
'bundle' => $bundle,
];
return $next_key;
}
return FALSE;
}
/**
* {@inheritdoc}
*/
public function setDefaultRegistrantType($registrant_type_id) {
$this->default_registrant = $registrant_type_id;
return $this;
}
/**
* {@inheritdoc}
*/
public function id() {
return $this
->getEventEntityTypeId() . '.' . $this
->getEventBundle();
}
/**
* {@inheritdoc}
*/
public static function courierContextCC($entity_type, $operation) {
$event_types = \Drupal::service('rng.event_manager')
->eventTypeWithEntityType($entity_type);
if (!count($event_types)) {
$courier_context = CourierContext::load('rng_registration_' . $entity_type);
if ($courier_context) {
if ($operation == 'delete') {
$courier_context
->delete();
}
}
else {
if ($operation == 'create') {
$entity_type_info = \Drupal::entityTypeManager()
->getDefinition($entity_type);
$courier_context = CourierContext::create([
'label' => t('Event (@entity_type): Registration', [
'@entity_type' => $entity_type_info
->getLabel(),
]),
'id' => 'rng_registration_' . $entity_type,
'tokens' => [
$entity_type,
'registration',
],
]);
$courier_context
->save();
}
}
}
}
/**
* {@inheritdoc}
*/
public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
if ($this
->isNew()) {
$this
->courierContextCC($this->entity_type, 'create');
}
}
/**
* {@inheritdoc}
*/
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
parent::postSave($storage, $update);
// Create mode for the entity type.
$mode_id = $this->entity_type . '.rng_event';
if (!EntityFormMode::load($mode_id)) {
EntityFormMode::create([
'id' => $mode_id,
'targetEntityType' => $this->entity_type,
'label' => 'Event Settings',
'status' => TRUE,
])
->save();
}
if (!$update) {
module_load_include('inc', 'rng', 'rng.field.defaults');
foreach ($this->fields as $field) {
rng_add_event_field_storage($field, $this->entity_type);
rng_add_event_field_config($field, $this
->getEventEntityTypeId(), $this
->getEventBundle());
}
}
$display = entity_get_form_display($this->entity_type, $this->bundle, 'rng_event');
if ($display
->isNew()) {
// EntityDisplayBase::init() adds default fields. Remove them.
foreach (array_keys($display
->getComponents()) as $name) {
if (!in_array($name, $this->fields)) {
$display
->removeComponent($name);
}
}
// Weight is the key.
$field_weights = [
EventManagerInterface::FIELD_STATUS,
EventManagerInterface::FIELD_ALLOW_DUPLICATE_REGISTRANTS,
EventManagerInterface::FIELD_WAIT_LIST,
EventManagerInterface::FIELD_REGISTRANTS_CAPACITY,
EventManagerInterface::FIELD_EMAIL_REPLY_TO,
EventManagerInterface::FIELD_REGISTRATION_TYPE,
EventManagerInterface::FIELD_REGISTRATION_GROUPS,
];
module_load_include('inc', 'rng', 'rng.field.defaults');
foreach ($this->fields as $name) {
rng_add_event_form_display_defaults($display, $name);
if (in_array($name, $field_weights)) {
$component = $display
->getComponent($name);
$component['weight'] = array_search($name, $field_weights);
$display
->setComponent($name, $component);
}
}
$display
->save();
}
// Rebuild routes and local tasks.
\Drupal::service('router.builder')
->setRebuildNeeded();
// Rebuild local actions https://github.com/dpi/rng/issues/18
\Drupal::service('plugin.manager.menu.local_action')
->clearCachedDefinitions();
}
/**
* {@inheritdoc}
*/
public function delete() {
foreach ($this->fields as $field) {
$field = FieldConfig::loadByName($this
->getEventEntityTypeId(), $this
->getEventBundle(), $field);
if ($field) {
$field
->delete();
}
$display = entity_get_form_display($this->entity_type, $this->bundle, 'rng_event');
if (!$display
->isNew()) {
$display
->delete();
}
}
parent::delete();
}
/**
* {@inheritdoc}
*/
public static function postDelete(EntityStorageInterface $storage, array $entities) {
parent::postDelete($storage, $entities);
if ($event_type = reset($entities)) {
RngEventType::courierContextCC($event_type->entity_type, 'delete');
}
// Rebuild routes and local tasks.
\Drupal::service('router.builder')
->setRebuildNeeded();
// Rebuild local actions https://github.com/dpi/rng/issues/18
\Drupal::service('plugin.manager.menu.local_action')
->clearCachedDefinitions();
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
parent::calculateDependencies();
// Event entity type/bundle.
$entity_type = \Drupal::entityTypeManager()
->getDefinition($this
->getEventEntityTypeId());
if ($entity_type) {
$bundle_entity_type = $entity_type
->getBundleEntityType();
if ($bundle_entity_type && $bundle_entity_type !== 'bundle') {
$bundle = \Drupal::entityTypeManager()
->getStorage($entity_type
->getBundleEntityType())
->load($this
->getEventBundle());
if ($bundle) {
$this
->addDependency('config', $bundle
->getConfigDependencyName());
}
}
else {
$this
->addDependency('module', $entity_type
->getProvider());
}
}
// Default registrant type.
$registrant_type_id = $this
->getDefaultRegistrantType();
if ($registrant_type_id) {
$registrant_type = RegistrantType::load($registrant_type_id);
if ($registrant_type) {
$this
->addDependency('config', $registrant_type
->getConfigDependencyName());
}
}
return $this;
}
/**
* {@inheritdoc}
*/
public function onDependencyRemoval(array $dependencies) {
$changed = parent::onDependencyRemoval($dependencies);
foreach ($dependencies['config'] as $entity) {
if ($entity instanceof RegistrantTypeInterface) {
// Registrant type is being deleted.
if ($entity
->id() === $this
->getDefaultRegistrantType()) {
$this
->setDefaultRegistrantType(NULL);
$changed = TRUE;
}
}
}
return $changed;
}
/**
* @inheritDoc
*/
public function getAllowAnonRegistrants() {
return $this->allow_anon_registrants;
}
/**
* @inheritDoc
*/
public function setAllowAnonRegistrants($allow_anon_registrants) {
$this->allow_anon_registrants = $allow_anon_registrants;
return $this;
}
/**
* @inheritDoc
*/
public function getAutoSyncRegistrants() {
return $this->auto_sync_registrants;
}
/**
* @inheritDoc
*/
public function setAutoSyncRegistrants($auto_sync_registrants) {
$this->auto_sync_registrants = $auto_sync_registrants;
return $this;
}
/**
* @inheritDoc
*/
public function getAutoAttachUsers() {
return $this->auto_attach_users;
}
/**
* @inheritDoc
*/
public function setAutoAttachUsers($auto_attach_users) {
$this->auto_attach_users = $auto_attach_users;
return $this;
}
/**
* @inheritDoc
*/
public function getRegistrantEmailField() {
return $this->registrant_email_field;
}
/**
* @inheritDoc
*/
public function setRegistrantEmailField($registrant_email_field) {
$this->registrant_email_field = $registrant_email_field;
return $this;
}
/**
* @inheritDoc
*/
public function getEventStartDateField() {
return $this->event_start_date_field;
}
/**
* @inheritDoc
*/
public function setEventStartDateField($event_start_date_field) {
$this->event_start_date_field = $event_start_date_field;
return $this;
}
/**
* @inheritDoc
*/
public function getEventEndDateField() {
return $this->event_end_date_field;
}
/**
* @inheritDoc
*/
public function setEventEndDateField($event_end_date_field) {
$this->event_end_date_field = $event_end_date_field;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyTrait:: |
protected | property | Cache contexts. | |
CacheableDependencyTrait:: |
protected | property | Cache max-age. | |
CacheableDependencyTrait:: |
protected | property | Cache tags. | |
CacheableDependencyTrait:: |
protected | function | Sets cacheability; useful for value object constructors. | |
ConfigEntityBase:: |
private | property | Whether the config is being deleted by the uninstall process. | |
ConfigEntityBase:: |
protected | property | The language code of the entity's default language. | |
ConfigEntityBase:: |
protected | property | The original ID of the configuration entity. | |
ConfigEntityBase:: |
protected | property | The enabled/disabled status of the configuration entity. | 4 |
ConfigEntityBase:: |
protected | property | Third party entity settings. | |
ConfigEntityBase:: |
protected | property | Trust supplied data and not use configuration schema on save. | |
ConfigEntityBase:: |
protected | property | The UUID for this entity. | |
ConfigEntityBase:: |
protected | property | Information maintained by Drupal core about configuration. | |
ConfigEntityBase:: |
protected | function | Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). | |
ConfigEntityBase:: |
public | function |
Creates a duplicate of the entity. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Disables the configuration entity. Overrides ConfigEntityInterface:: |
1 |
ConfigEntityBase:: |
public | function |
Enables the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the cache tags that should be used to invalidate caches. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Gets the configuration dependency name. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected static | function | Gets the configuration manager. | |
ConfigEntityBase:: |
public | function |
Gets the configuration target identifier for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the configuration dependencies. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
protected | function | Gets the typed config manager. | |
ConfigEntityBase:: |
public | function |
Gets whether on not the data is trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
protected static | function |
Override to never invalidate the individual entities' cache tags; the
config system already invalidates them. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected | function |
Override to never invalidate the entity's cache tag; the config system
already invalidates it. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Checks whether this entity is installable. Overrides ConfigEntityInterface:: |
2 |
ConfigEntityBase:: |
public | function |
Overrides Entity::isNew(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase:: |
8 |
ConfigEntityBase:: |
public | function |
Saves an entity permanently. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Sets the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets the status of the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function | ||
ConfigEntityBase:: |
public static | function | Helper callback for uasort() to sort configuration entities by weight and label. | 6 |
ConfigEntityBase:: |
public | function |
Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface:: |
4 |
ConfigEntityBase:: |
public | function |
Gets an array of all property values. Overrides EntityBase:: |
2 |
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets that the data should be trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Unsets a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the public URL for this entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Constructs an Entity object. Overrides EntityBase:: |
10 |
ConfigEntityBase:: |
public | function |
Overrides EntityBase:: |
4 |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | Aliased as: traitSleep | 1 |
DependencySerializationTrait:: |
public | function | 2 | |
DependencyTrait:: |
protected | property | The object's dependencies. | |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. Aliased as: addDependencyTrait | |
EntityBase:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
EntityBase:: |
protected | property | The entity type. | |
EntityBase:: |
protected | property | A typed data object wrapping this entity. | |
EntityBase:: |
public | function |
Checks data value access. Overrides AccessibleInterface:: |
1 |
EntityBase:: |
public | function |
Gets the bundle of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public static | function |
Constructs a new entity object, without permanently saving it. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Enforces an entity to be new. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets the entity manager. | |
EntityBase:: |
protected | function | Gets the entity type bundle info service. | |
EntityBase:: |
protected | function | Gets the entity type manager. | |
EntityBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the entity type definition. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the ID of the type of the entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | The list cache tags to invalidate for this entity. | |
EntityBase:: |
public | function |
Gets a typed data object for this entity object. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Indicates if a link template exists for a given key. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the label of the entity. Overrides EntityInterface:: |
6 |
EntityBase:: |
public | function |
Gets the language of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the language manager. | |
EntityBase:: |
protected | function | Gets an array link templates. | 1 |
EntityBase:: |
public static | function |
Loads an entity. Overrides EntityInterface:: |
|
EntityBase:: |
public static | function |
Loads one or more entities. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Acts on a created entity before hooks are invoked. Overrides EntityInterface:: |
4 |
EntityBase:: |
public static | function |
Acts on loaded entities. Overrides EntityInterface:: |
2 |
EntityBase:: |
public static | function |
Changes the values of an entity before it is created. Overrides EntityInterface:: |
5 |
EntityBase:: |
public | function |
Gets a list of entities referenced by this entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Generates the HTML for a link to this entity. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets a list of URI relationships supported by this entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets an array of placeholders for this entity. | 2 |
EntityBase:: |
public | function |
Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the UUID generator. | |
PluginDependencyTrait:: |
protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 |
PluginDependencyTrait:: |
protected | function | Calculates and returns dependencies of a specific plugin instance. | |
PluginDependencyTrait:: |
protected | function | Wraps the module handler. | 1 |
PluginDependencyTrait:: |
protected | function | Wraps the theme handler. | 1 |
RefinableCacheableDependencyTrait:: |
public | function | 1 | |
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RngEventType:: |
protected | property | Whether or not registrants should be allowed to be added registrations without any other identity entity. | |
RngEventType:: |
protected | property | Whether or not to automatically attach registrants to user identities by email. | |
RngEventType:: |
protected | property | Whether or not matching field data should be sync'd with identities when a registrant is saved. | |
RngEventType:: |
protected | property | The ID of the event bundle type. | |
RngEventType:: |
public | property | Allow event managers to customize default rules. | |
RngEventType:: |
protected | property | Default messages configured for this event type. | |
RngEventType:: |
protected | property | Registrant type for new registrants associated with this event type. | |
RngEventType:: |
protected | property | The ID of the event entity type. | |
RngEventType:: |
protected | property | ||
RngEventType:: |
protected | property | ||
RngEventType:: |
public | property | Fields to add to event bundles. | |
RngEventType:: |
protected | property | The machine name of this event config. | |
RngEventType:: |
public | property | Mirror update permissions. | |
RngEventType:: |
protected | property | Types of people types allowed to be associated with this event type. | |
RngEventType:: |
protected | property | An email field on the registrant to use to sync to users. | |
RngEventType:: |
public | function |
Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityBase:: |
|
RngEventType:: |
public | function |
Whether a identity type can be created. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Whether an existing identity type can be referenced. Overrides EventTypeInterface:: |
|
RngEventType:: |
public static | function |
Create or clean up courier_context if none exist for an entity type. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Deletes an entity permanently. Overrides EntityBase:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Whether to allow event managers to customize default rules. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Default messages configured for this event type. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Registrant type for new registrants associated with this event type. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Get event bundle. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Get event entity type ID. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Gets which permission on event entity grants 'event manage' permission. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Get the form display mode used when the identity is created inline. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Get the form display modes for creating identities inline. Overrides EventTypeInterface:: |
|
RngEventType:: |
protected | function | Get the array key of the people type. | |
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Gets the identifier. Overrides EntityBase:: |
|
RngEventType:: |
public | function |
Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityBase:: |
|
RngEventType:: |
public static | function |
Acts on deleted entities before the delete hook is invoked. Overrides EntityBase:: |
|
RngEventType:: |
public | function |
Acts on a saved entity before the insert or update hook is invoked. Overrides EntityBase:: |
|
RngEventType:: |
public | function |
Acts on an entity before the presave hook is invoked. Overrides ConfigEntityBase:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set whether event managers can customize default rules. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set default messages for this event type. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set registrant type for new registrants associated with this event type. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Sets the event bundle. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Sets the event entity type ID. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Sets operation to mirror from the event entity. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set whether an identity type can be created. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set the form display mode used when the identity is created inline. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
Set whether existing identity type can be referenced. Overrides EventTypeInterface:: |
|
RngEventType:: |
public | function |
@inheritDoc Overrides EventTypeInterface:: |
|
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function |