You are here

interface EventManagerInterface in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/EventManagerInterface.php \Drupal\rng\EventManagerInterface
  2. 8 src/EventManagerInterface.php \Drupal\rng\EventManagerInterface

Event manager for RNG.

Hierarchy

Expanded class hierarchy of EventManagerInterface

All classes that implement EventManagerInterface

43 files declare their use of EventManagerInterface
CourierTemplateCollection.php in src/Plugin/Action/CourierTemplateCollection.php
EntityIsEventCheck.php in src/Access/EntityIsEventCheck.php
EventAccessForm.php in src/Form/EventAccessForm.php
EventAccessResetForm.php in src/Form/EventAccessResetForm.php
EventDateStringField.php in src/Plugin/views/field/EventDateStringField.php

... See full list

File

src/EventManagerInterface.php, line 11

Namespace

Drupal\rng
View source
interface EventManagerInterface {

  /**
   * ID of an `entity_reference` field attached to an event bundle.
   *
   * Specifies the registration type of registrations that can be created for
   * an event. This field references registration_type entities.
   */
  const FIELD_REGISTRATION_TYPE = 'rng_registration_type';

  /**
   * ID of an `entity_reference` field attached to an event bundle.
   *
   * Specifies the groups that are applied to new registrations. This field
   * references registration_group entities.
   */
  const FIELD_REGISTRATION_GROUPS = 'rng_registration_groups';

  /**
   * ID of an `boolean` field attached to an event bundle.
   *
   * Whether an event is accepting new registrations.
   */
  const FIELD_STATUS = 'rng_status';

  /**
   * ID of an `integer` field attached to an event bundle.
   *
   * The absolute maximum number of registrants that can be signed up
   * for an event. A negative or missing value indicates unlimited capacity.
   */
  const FIELD_REGISTRANTS_CAPACITY = 'rng_registrants_capacity';

  /**
   * ID of a 'boolean' field attached to an event bundle.
   *
   * Whether FIELD_REGISTRANTS_CAPACITY include
   * confirmed registrations only (TRUE) or all registrations, including
   * unconfirmed (FALSE).
   */
  const FIELD_CAPACITY_CONFIRMED_ONLY = 'rng_capacity_confirmed_only';

  /**
   * ID of an `boolean` field attached to an event bundle.
   *
   * Whether an event allows a wait list.
   */
  const FIELD_WAIT_LIST = 'rng_wait_list';

  /**
   * ID of an `email` field attached to an event bundle.
   *
   * Reply-to address for e-mails sent from an event.
   */
  const FIELD_EMAIL_REPLY_TO = 'rng_reply_to';

  /**
   * ID of an `boolean` field attached to an event bundle.
   *
   * Whether an event allows a registrant to associate with multiple
   * registrations. An empty value reverts to the site default.
   */
  const FIELD_ALLOW_DUPLICATE_REGISTRANTS = 'rng_registrants_duplicate';

  /**
   * Get the meta instance for an event.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   An event entity.
   *
   * @return \Drupal\rng\EventMetaInterface|null
   *   An event meta object.
   *
   * @throws \Drupal\rng\Exception\InvalidEventException
   *   If the $entity is not an event.
   */
  public function getMeta(EntityInterface $entity);

  /**
   * Determines if an entity is an event.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   An event entity.
   *
   * @return bool
   *   Whether the entity is an event.
   */
  public function isEvent(EntityInterface $entity);

  /**
   * Get event type config for an event bundle.
   *
   * Use this to test whether an entity bundle is an event type.
   *
   * @param string $entity_type
   *   An entity type ID.
   * @param string $bundle
   *   A bundle ID.
   *
   * @return \Drupal\rng\Entity\EventTypeInterface|null
   */
  public function eventType($entity_type, $bundle);

  /**
   * Gets all event types associated with an entity type.
   *
   * @param string $entity_type
   *   An entity type ID.
   *
   * @return \Drupal\rng\Entity\EventTypeInterface[]
   *   An array of event type config entities
   */
  public function eventTypeWithEntityType($entity_type);

  /**
   * Get all event types configuration entities.
   *
   * @return array
   *   A multidimensional array: [event_entity_type][event_bundle] = $event_type
   */
  public function getEventTypes();

  /**
   * Invalidate cache for events types.
   */
  public function invalidateEventTypes();

  /**
   * Invalidate cache for an event type.
   *
   * @param \Drupal\rng\Entity\EventTypeInterface $event_type
   *   An event type.
   */
  public function invalidateEventType(EventTypeInterface $event_type);

}

Members

Namesort descending Modifiers Type Description Overrides
EventManagerInterface::eventType public function Get event type config for an event bundle. 1
EventManagerInterface::eventTypeWithEntityType public function Gets all event types associated with an entity type. 1
EventManagerInterface::FIELD_ALLOW_DUPLICATE_REGISTRANTS constant ID of an `boolean` field attached to an event bundle.
EventManagerInterface::FIELD_CAPACITY_CONFIRMED_ONLY constant ID of a 'boolean' field attached to an event bundle.
EventManagerInterface::FIELD_EMAIL_REPLY_TO constant ID of an `email` field attached to an event bundle.
EventManagerInterface::FIELD_REGISTRANTS_CAPACITY constant ID of an `integer` field attached to an event bundle.
EventManagerInterface::FIELD_REGISTRATION_GROUPS constant ID of an `entity_reference` field attached to an event bundle.
EventManagerInterface::FIELD_REGISTRATION_TYPE constant ID of an `entity_reference` field attached to an event bundle.
EventManagerInterface::FIELD_STATUS constant ID of an `boolean` field attached to an event bundle.
EventManagerInterface::FIELD_WAIT_LIST constant ID of an `boolean` field attached to an event bundle.
EventManagerInterface::getEventTypes public function Get all event types configuration entities. 1
EventManagerInterface::getMeta public function Get the meta instance for an event. 1
EventManagerInterface::invalidateEventType public function Invalidate cache for an event type. 1
EventManagerInterface::invalidateEventTypes public function Invalidate cache for events types. 1
EventManagerInterface::isEvent public function Determines if an entity is an event. 1