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

array_diff in custom module

Hi, I don't know if I'm Off topic if so I apologize in advance.
I have 2 arrays that I feed with employee codes.
$aDipe contains all employees
$aDipeA contains the dependent codes that cannot work
Currently the array is made up as follows:

$aDipe[$dipeID]['id'] 	    = $dipeID ;
     $aDipeA[$dipeID]['id'] = $dipeID ;
            array_diff($aDipe, $aDipeA) ;

And it works well

Superfish overwritten css styles

Hi Drupal Community, I hope this is the right place to posting this question.

[SOLVED] Flag onFlag action perform

Hello, I want to write a custom module for flags. It should perform some actions, if a user flagged a user and the user who's got flagged, already flagged the flagging user. You know?

I found this snippet, but I really don't know, how I can get this to work. Is it possible to get this done? And if so, how I can get the user who's flagged and check if he has also flagged the other user?

Snippet:

<?php

Passing right single quote into MySQL

Related to this post for some reason customer's theme appears to be mishandling the single foot mark (') which most refer to as apostrophe and at the twig.engine stage is outputiting the html of

Populate webform with previous submission data

Any webform experts in here? I'm using Drupal webform module and trying to populate a webform with previous submission data and while there is an option "Autofill with previous submission data" this only works if you are logged into the site with an active session, not for anonymous users.  I looked at using webform secure token but that merely opens a webform submissions page to view or update submission.

Add a new link in commerce order

Hi, i think that this is simple but is the fist time tha i do it and i dont find the way to do it.
I try to make a new tab. I have this route:

entity.commerce_order.generate_label_form:
  path: /admin/commerce/orders/{commerce_order}/generate_label
  defaults:
    _form: \Drupal\commerce_envialia\Form\generatelabel
    _title: 'Generate label'
  options:
    parameters:
      commerce_order:
        type: 'entity:commerce_order'
  requirements:

Pages

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