Loading src/Controller/AdminFeedbackController.php +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ class AdminFeedbackController extends ControllerBase { * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager */ public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { final public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { $this->database = $database; $this->requestStack = $requestStack->getCurrentRequest(); $this->langcode = $languageManager->getCurrentLanguage()->getId(); Loading src/Form/AdminFeedbackAjaxForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class AdminFeedbackAjaxForm extends FormBase { /** * Construct an AdminFeedbackController object. */ public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { final public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { $this->database = $database; $this->requestStack = $requestStack; $this->languageManager = $languageManager; Loading src/Form/AdminFeedbackDeleteForm.php +26 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ use Drupal\Core\Database\Database; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Drupal\image\ImageStyleInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form for deleting a feedback response. Loading @@ -23,6 +24,29 @@ class AdminFeedbackDeleteForm extends ConfirmFormBase { */ protected $feedbackId; /** * The entity type manager. * * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** * Constructs a new VariantPluginFormBase. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager * The entity type manager service. */ final public function __construct(EntityTypeManagerInterface $entityTypeManager) { $this->entityTypeManager = $entityTypeManager; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static($container->get('entity_type.manager')); } /** * {@inheritdoc} */ Loading Loading @@ -82,7 +106,7 @@ class AdminFeedbackDeleteForm extends ConfirmFormBase { // Get and update feedback score details for node and language. if (isset($nid) && isset($feedback_type)) { $node = \Drupal::service('entity_type.manager')->getStorage('node')->load($nid); $node = $this->entityTypeManager->getStorage('node')->load($nid); $query = $connection->select('admin_feedback_score', 'admin_feedback_score') ->fields('admin_feedback_score', ['id', 'count', 'yes_count', 'no_count', 'total_score']) ->condition('admin_feedback_score.nid', $nid, '=') Loading src/Plugin/Block/AdminFeedbackBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class AdminFeedbackBlock extends BlockBase implements ContainerFactoryPluginInte * @param \Drupal\Core\Routing\CurrentRouteMatch $routeMatch * @param \Drupal\Core\Form\FormBuilder $builder */ public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, CurrentRouteMatch $routeMatch, FormBuilder $builder) { final public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, CurrentRouteMatch $routeMatch, FormBuilder $builder) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->configFactory = $configFactory; $this->routeMatch = $routeMatch; Loading Loading
src/Controller/AdminFeedbackController.php +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ class AdminFeedbackController extends ControllerBase { * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager */ public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { final public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { $this->database = $database; $this->requestStack = $requestStack->getCurrentRequest(); $this->langcode = $languageManager->getCurrentLanguage()->getId(); Loading
src/Form/AdminFeedbackAjaxForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class AdminFeedbackAjaxForm extends FormBase { /** * Construct an AdminFeedbackController object. */ public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { final public function __construct(Connection $database, RequestStack $requestStack, LanguageManagerInterface $languageManager, EventDispatcherInterface $eventDispatcher) { $this->database = $database; $this->requestStack = $requestStack; $this->languageManager = $languageManager; Loading
src/Form/AdminFeedbackDeleteForm.php +26 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ use Drupal\Core\Database\Database; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Drupal\image\ImageStyleInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form for deleting a feedback response. Loading @@ -23,6 +24,29 @@ class AdminFeedbackDeleteForm extends ConfirmFormBase { */ protected $feedbackId; /** * The entity type manager. * * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** * Constructs a new VariantPluginFormBase. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager * The entity type manager service. */ final public function __construct(EntityTypeManagerInterface $entityTypeManager) { $this->entityTypeManager = $entityTypeManager; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static($container->get('entity_type.manager')); } /** * {@inheritdoc} */ Loading Loading @@ -82,7 +106,7 @@ class AdminFeedbackDeleteForm extends ConfirmFormBase { // Get and update feedback score details for node and language. if (isset($nid) && isset($feedback_type)) { $node = \Drupal::service('entity_type.manager')->getStorage('node')->load($nid); $node = $this->entityTypeManager->getStorage('node')->load($nid); $query = $connection->select('admin_feedback_score', 'admin_feedback_score') ->fields('admin_feedback_score', ['id', 'count', 'yes_count', 'no_count', 'total_score']) ->condition('admin_feedback_score.nid', $nid, '=') Loading
src/Plugin/Block/AdminFeedbackBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class AdminFeedbackBlock extends BlockBase implements ContainerFactoryPluginInte * @param \Drupal\Core\Routing\CurrentRouteMatch $routeMatch * @param \Drupal\Core\Form\FormBuilder $builder */ public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, CurrentRouteMatch $routeMatch, FormBuilder $builder) { final public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, CurrentRouteMatch $routeMatch, FormBuilder $builder) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->configFactory = $configFactory; $this->routeMatch = $routeMatch; Loading