One of the Drupal entities is Aggregator which comes with a defined set of how to save these entities using Drupal\Core\Entity\Sql\SqlContentEntityStorage
Would you agree with me that while I can alter the MySQL table that it would be ultimately self-defeating since it would be overwritten in the next Drupal core update? And better to alter it in a custom module?
With the new paradigm in Drupal 8, I don't know enough to say this is the best path? thx, sam
My view lists entities of a certain type and I need to let authorized users be able to run CRUD operations on them. Searching I find a suggestion that in D7 see how Drupal uses the Views API to do this. Makes sense, I would use that API for my custom module in D7. Now for D8, I suspect that the views would be a PlugIn.
Looking at /admin/content I understand that is a View of nodes with the operations I need. Looking at Webprofiler I see that the controller is not within Node, but within the Views module itself. So already my understanding is broken in D8.
I am working on sidebar menu in a Custom Drupal 8 Theme. I am trying to set a class of sidebar__menu--submenu-1,sidebar__menu--submenu-2, sidebar__menu--submenu-3 and so on depending on the level of the submenus.
So far, I was able to add the class sidebar__menu to the first level & sidebar__menu--submenu to all the submenus. However, I want to add the class sidebar__menu--submenu-(number of the level) so I can style & control the sidebar better on css.
Hello. First of all, sorry for my english, i am not really pro with languages.
I am building a custom module. At this point i did a page, a form and can send it to database. Now i need build another page for update the data inserted in last form. I dont want to build another module, and i suposse there are other ways to do it on same module.
I was trying to integrate Dojo JS library with Drupal 8.
I added the library in themes/custom folder and gave its reference in the libraries.yml file.
But this doesnt work. In console i get error as :
Uncaught ReferenceError: Backbone is not defined
Uncaught TypeError: Cannot read property 'util' of undefined
Uncaught ReferenceError: domready is not defined
Uncaught TypeError: Cannot read property 'toLowerCase' of null
What is the most elegant way to send a notification to a specified UID from an anonymous session? I have a webhook (function triggered by server-server request) that need to notify the relevant users about incoming payments from the bank.
What exactly do I need?
Drupal::messenger()->addMessage(t('Send message to selected UID=10.'), 'error', TRUE, $uid=10);