Drupal rules custom action

broken image
broken image

The purpose of this simple action is to convert booking enquiries (that come in via a webform on a website) into confirmed booking entities (a custom entity). Now create your class (in my case, the class file is called ConvertEnquiryToBooking.php), the code below is a simple action that I have created.

broken image
broken image

Now we can get on with creating our action(s), first we will look at creating a basic action.įirst we need to ensure that you have inside your custom module, a folder called src with a folder for Plugin inside then another folder inside Plugin called Action and we will be adding out action classes into the Action folder.

broken image