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

How do you programmatically get the main menu links that are accessible to the current user

I need to get the main menu into a multidimensional array format. I know you can get the 'main' menu like this:

$parameters = new MenuTreeParameters();

$tree = \Drupal::menuTree()->load('main', $parameters);

But this gives me all links in the menu. I want the restricted version of the menu that has access restrictions. Any ideas?

How to export content type from Drupal 7 to Drupal 8

Hi friends

i'm building a new site on drupal 8, but now all my content type is on drupal 7, 

so the question is, how can i export all my content type and its content from drupal 7 and import on drupal 8?

i was thinkig to creare a xml file and read that file and save my content, but i dont know if there is another way to do that.

Could you please help me?

Regards

When adding custom twig template to form it gives error

When I add custom twig template for my custom form it gives following error

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName()

My form buildForm is like this

Drupal 7 - Click button and then set form field value and redisplay form

This is not working for some reason. The form is redisplayed but the textarea field remains empty. Why?

How do I fix this error about the Node class not found?

I've installed Drupal 8, I've created a PHP file to read a XML file and insert some items, but I'm getting this error.

Fatal error: Uncaught Error: Class 'Drupal\node\Entity\Node' not found in C:\xampp\htdocs\drupal8\migracion.php:12 Stack trace: #0 {main} thrown in C:\xampp\htdocs\drupal8\migracion.php on line 12

This is the code I am using.

Delete nodes if date(custom field) is pasted

Hi everyone, 

I have a content type "sale" with a field "date", and I would like to delete node automaticaly when date is more thant 7days after now.

Rules en Drupal 8, is a nightmare for me ! I tryed to make a custom module but it's not a success...

Do you have a solution for me ?

Thank you so much for your help !

Pages

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