diff --git a/recurring_events.yml b/recurring_events.yml deleted file mode 100644 index 87ee2fbd75f7f0fefe2254d10b4e935eceddebe0..0000000000000000000000000000000000000000 --- a/recurring_events.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Recurring Events' -type: module -description: 'Events and Registration Management Module' -core: 8.x -package: 'recurring_events' diff --git a/src/Entity/EventSeries.php b/src/Entity/EventSeries.php index 1ce3e6105cc8e8ff2742760f1752767cf0a92973..667abd10285e2b473c76c841c85d3703acdf2d8d 100644 --- a/src/Entity/EventSeries.php +++ b/src/Entity/EventSeries.php @@ -72,17 +72,16 @@ use Drupal\user\UserInterface; * id = "eventseries", * label = @Translation("Event entity"), * handlers = { - * "storage" = "Drupal\recurring_events\EventStorage", + * "storage" = "Drupal\Core\Entity\Sql\SqlContentEntityStorage", * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", - * "list_builder" = "Drupal\recurring_events\Entity\Controller\EventListBuilder", * "views_data" = "Drupal\views\EntityViewsData", * "form" = { - * "add" = "Drupal\recurring_events\Form\EventForm", - * "edit" = "Drupal\recurring_events\Form\EventForm", - * "delete" = "Drupal\recurring_events\Form\EventDeleteForm", - * "clone" = "Drupal\recurring_events\Form\EventCloneForm", + * "add" = "Drupal\recurring_events\Form\EventSeriesForm", + * "edit" = "Drupal\recurring_events\Form\EventSeriesForm", + * "delete" = "Drupal\recurring_events\Form\EventSeriesDeleteForm", + * "clone" = "Drupal\recurring_events\Form\EventSeriesCloneForm", * }, - * "access" = "Drupal\recurring_events\EventAccessControlHandler", + * "access" = "Drupal\recurring_events\EventSeriesAccessControlHandler", * }, * base_table = "eventseries", * data_table = "eventseries_field_data", diff --git a/src/EventStorage.php b/src/EventStorage.php deleted file mode 100644 index 43a65d60278c17e0881b57fb165efc7cc58abbdf..0000000000000000000000000000000000000000 --- a/src/EventStorage.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -namespace Drupal\recurring_events; - -use Drupal\Core\Entity\Sql\SqlContentEntityStorage; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Language\LanguageInterface; - -/** - * Defines the storage handler class for events. - * - * This extends the base storage class, adding required special handling for - * event entities. - */ -class EventStorage extends SqlContentEntityStorage implements EventStorageInterface { - - /** - * {@inheritdoc} - */ - public function revisionIds(EventInterface $event) { - return $this->database->query( - 'SELECT vid FROM {event_revision} WHERE id=:id ORDER BY vid', - [':id' => $event->id()] - )->fetchCol(); - } - - /** - * {@inheritdoc} - */ - public function userRevisionIds(AccountInterface $account) { - return $this->database->query( - 'SELECT vid FROM {event_revision} WHERE user_id = :user_id ORDER BY vid', - [':user_id' => $account->id()] - )->fetchCol(); - } - - /** - * {@inheritdoc} - */ - public function countDefaultLanguageRevisions(EventInterface $event) { - return $this->database->query('SELECT COUNT(*) FROM {event_revision} WHERE id = :id', [':id' => $event->id()])->fetchField(); - } - - /** - * {@inheritdoc} - */ - public function clearRevisionsLanguage(LanguageInterface $language) { - return $this->database->update('event_revision') - ->fields(['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED]) - ->condition('langcode', $language->getId()) - ->execute(); - } - -} diff --git a/src/EventStorageInterface.php b/src/EventStorageInterface.php deleted file mode 100644 index b48e7d92891241dc6b98f2164713910454a9adf3..0000000000000000000000000000000000000000 --- a/src/EventStorageInterface.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace Drupal\recurring_events; - -use Drupal\Core\Entity\ContentEntityStorageInterface; -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Defines an interface for event entity storage classes. - */ -interface EventStorageInterface extends ContentEntityStorageInterface { - - /** - * Gets a list of event revision IDs for a specific event. - * - * @param \Drupal\recurring_events\EventInterface $event - * The event entity. - * - * @return int[] - * Event revision IDs (in ascending order). - */ - public function revisionIds(EventInterface $event); - - /** - * Gets a list of revision IDs having a given user as event author. - * - * @param \Drupal\Core\Session\AccountInterface $account - * The user entity. - * - * @return int[] - * Event revision IDs (in ascending order). - */ - public function userRevisionIds(AccountInterface $account); - - /** - * Counts the number of revisions in the default language. - * - * @param \Drupal\recurring_events\EventInterface $event - * The event entity. - * - * @return int - * The number of revisions in the default language. - */ - public function countDefaultLanguageRevisions(EventInterface $event); - - /** - * Unsets the language for all events with the given language. - * - * @param \Drupal\Core\Language\LanguageInterface $language - * The language object. - */ - public function clearRevisionsLanguage(LanguageInterface $language); - -} diff --git a/src/Plugin/Field/FieldType/MonthlyRecurringDate.php b/src/Plugin/Field/FieldType/MonthlyRecurringDate.php index 2900932b5284987454326ee6174451413794bd93..a5935393dc4f59aca115681b6d71e571ce06bc53 100644 --- a/src/Plugin/Field/FieldType/MonthlyRecurringDate.php +++ b/src/Plugin/Field/FieldType/MonthlyRecurringDate.php @@ -70,7 +70,7 @@ class MonthlyRecurringDate extends WeeklyRecurringDate { ->setLabel(t('Day Occurrence')) ->setDescription(t('Which occurence of the day(s) of the week should event take place')); - $properties['day_of_month'] = DataDefinition::create('int') + $properties['day_of_month'] = DataDefinition::create('integer') ->setLabel(t('Day of Month')) ->setDescription(t('The days of the month on which the event takes place'));