U
U
UntitledNikname2019-11-22 14:14:23
Drupal
UntitledNikname, 2019-11-22 14:14:23

How can I connect modules to my own api?

A couple of modules should take data from one api. How to write a library correctly and connect to all ... or a controller?
Drupal works on modules, I have no idea how to connect one module to another. Maybe CMS supports custom libraries?!
Maybe there is an opportunity to make some kind of global method for all modules?
Drupal 8.7.10

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
andead, 2019-11-22
@UntitledNikname

Third-party php libraries in Drupal 8 are installed using composer. The functionality of the library will be available everywhere.

U
UntitledNikname, 2019-11-22
@UntitledNikname

Use entries like "dependencies[] = module_name_with_functions_library" in the info files of your modules. This is if correctly, as Drupal bequeathed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question