This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Expected parameter of type \Node... \NodeInterface provided

I develop in PhpStorm and it is complaining with the message:

Expected parameter of type \Drupal\node\Entity\Node, \Drupal\node\NodeInterface provided

Does this suggest I'm doing something wrong? In my class I have something like the following...

Need help for error code when switching from 5.3 to 5.6

Dear Drupal Community,

I am getting following error code:

Warning: Creating default object from empty value in adaptivetheme_preprocess_html() ( line 14 of / urs / ww / users / immobigg / drupal 7 / sites / all / themes / adaptivetheme / inc / template, process. inc)

1.) Can anybody tell me how to solve it - where do I have to change or delete something?

Using TWIG template for a page loaded into a modal

I have a page (form) that I've created a twig template for, it's called `form--edit-communication-method-form.html.twig`, it loads in my actual form items as well as some other markup to polish everything up. However, now I need to present this form in a modal, and I'm attempting to do so by loading the form like so

How to get a custom ...?id=... from my URL?

I want to have an ID in my URL and the controller of my module should take the ID from the URL and display it. If the ID is changed in the browser and the side is reloaded, the page should print out the new ID. My problem is, that I can't get the ID out of the URL.

Example: /node/31?id=930bcae8-f8e5-491f-84fc-cdf104ca7e40

I have tried to following lines of code, to get the id and print it out:

'text' => \Drupal::request()->query->all(), <- prints out nothing

Disable default behaviors of the Dialog Modal

I am attempting to use a modal on a particular page using the following link to get there

<a class="use-ajax" data-dialog-type="modal" href="/my-modal-page">

However, there is some default modal behaviors I would like to disable:

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions