Commit 6f7fb415 authored by lussoluca's avatar lussoluca

Fix compatibility with the latest release of Webform

parent 4819ea5d
......@@ -15,42 +15,42 @@ class ShortcutSetStorageDecorator extends ConfigEntityStorageDecorator implement
* {@inheritdoc}
*/
public function assignUser(ShortcutSetInterface $shortcut_set, $account) {
// TODO: Implement assignUser() method.
$this->getOriginalObject()->assignUser($shortcut_set, $account);
}
/**
* {@inheritdoc}
*/
public function unassignUser($account) {
// TODO: Implement unassignUser() method.
return $this->getOriginalObject()->unassignUser($account);
}
/**
* {@inheritdoc}
*/
public function deleteAssignedShortcutSets(ShortcutSetInterface $entity) {
// TODO: Implement deleteAssignedShortcutSets() method.
$this->getOriginalObject()->deleteAssignedShortcutSets($entity);
}
/**
* {@inheritdoc}
*/
public function getAssignedToUser($account) {
// TODO: Implement getAssignedToUser() method.
return $this->getOriginalObject()->getAssignedToUser($account);
}
/**
* {@inheritdoc}
*/
public function countAssignedUsers(ShortcutSetInterface $shortcut_set) {
// TODO: Implement countAssignedUsers() method.
return $this->getOriginalObject()->countAssignedUsers($shortcut_set);
}
/**
* {@inheritdoc}
*/
public function getDefaultSet(AccountInterface $account) {
// TODO: Implement getDefaultSet() method.
return $this->getOriginalObject()->getDefaultSet($account);
}
}
<?php
namespace Drupal\webprofiler\Entity\Decorators\Config;
use Drupal\webform\WebformEntityStorageInterface;
/**
* Class WebformStorageDecorator
*/
class WebformStorageDecorator extends ConfigEntityStorageDecorator implements WebformEntityStorageInterface {
/**
* {@inheritdoc}
*/
public function getCategories($template = NULL) {
return $this->getOriginalObject()->getCategories($template);
}
/**
* {@inheritdoc}
*/
public function getOptions($template = NULL) {
return $this->getOriginalObject()->getOptions($template);
}
}
......@@ -11,6 +11,7 @@ use Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\RoleStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\ShortcutSetStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\VocabularyStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\WebformStorageDecorator;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -98,6 +99,9 @@ class EntityManagerWrapper extends DefaultPluginManager implements EntityTypeMan
case 'shortcut_set':
return new ShortcutSetStorageDecorator($handler);
break;
case 'webform':
return new WebformStorageDecorator($handler);
break;
default:
return new ConfigEntityStorageDecorator($handler);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment