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

Displaying key values instead of values from multi-select

Hi,

I want to display the values from a multi-select field.   I am able to display the key values ( 'cell_phone' instead of 'cell phone', for example.  I'm also getting a warning on the cat_type : " Undefined array key "cat_type"has not been defined." I thought I defined it.

This is the code.

What is causing the error and how can I get the values instead of the keys?

Thank you

Is there no ability to search this forum?

I  do not see a way to search this forum for a topic that may answer my question. Am I missing something? Do I really have to go page by page to try and find a possible relevant question?

 

Override Administrative Menu Title Created By Contributed Module

I would like to override a contributed modules menu title to something that better describes what it does in my use case. I do not want to use a hook. How do I do this in Drupal 10?

Error Extending Unknown Class in Custom Serializer

I have created a custom module that has a customized serializer for modifying some objects in the views Image.

However, I am encountering the following error:

Class Drupal\custom_serializer\Plugin\views\style\CustomSerializer extends unknown class Drupal\rest\Plugin\views\style\Serializer.

this is my code:
 

[Solved]How to instantiate a controller from a custom module

Hi team

I have the following issue:
I've created a module with a controller, and I've created another module with another controller. I've imported that controller there, but when I try to instantiate it, it shows the error: 'Instantiated class Drupal\custom_module\Controller\getItems not found.'

here is my code:

Get the original query parameter from Request

I need an Array of the query-parameters. However, when I tried to get all the query parameters via the request-object, it returned two parameters, that didn't belong there: "destination" and "_exception_statuscode". Is there a way to get the original query from the request object?

Pages

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