Skip to content
Snippets Groups Projects
Commit 01b1303f authored by dpi's avatar dpi
Browse files

Fixed compatibility with Drupal8-beta13

Fixed #42
parent 6f29d7ba
No related branches found
No related tags found
No related merge requests found
...@@ -82,7 +82,7 @@ class EventTypeForm extends EntityForm { ...@@ -82,7 +82,7 @@ class EventTypeForm extends EntityForm {
} }
if ($event_type->isNew()) { if ($event_type->isNew()) {
$bundle_options = array(); $bundle_options = [];
// Generate a list of fieldable bundles which are not events. // Generate a list of fieldable bundles which are not events.
foreach ($this->entityManager->getDefinitions() as $entity_type) { foreach ($this->entityManager->getDefinitions() as $entity_type) {
if ($entity_type->isSubclassOf('\Drupal\Core\Entity\ContentEntityInterface')) { if ($entity_type->isSubclassOf('\Drupal\Core\Entity\ContentEntityInterface')) {
...@@ -133,9 +133,8 @@ class EventTypeForm extends EntityForm { ...@@ -133,9 +133,8 @@ class EventTypeForm extends EntityForm {
'#title' => $this->t('Bundle'), '#title' => $this->t('Bundle'),
'#options' => $bundle_options, '#options' => $bundle_options,
'#default_value' => $event_type->id(), '#default_value' => $event_type->id(),
'#required' => TRUE,
'#disabled' => !$event_type->isNew(), '#disabled' => !$event_type->isNew(),
'#empty_option' => $bundle_options ?: t('No Bundles Available'), '#empty_option' => $bundle_options ? NULL : t('No Bundles Available'),
); );
} }
......
...@@ -12,12 +12,15 @@ use Drupal\Core\Routing\RouteProviderInterface; ...@@ -12,12 +12,15 @@ use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\rng\EventManagerInterface; use Drupal\rng\EventManagerInterface;
use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Routing\RouteMatchInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
/** /**
* Modifies the reset access rules action. * Modifies the reset access rules action.
*/ */
class ResetAccessRules extends LocalActionDefault { class ResetAccessRules extends LocalActionDefault {
use StringTranslationTrait;
/** /**
* The RNG event manager. * The RNG event manager.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment