If you are a developer, you probably heard about all of them. However, you may also be surprised of this ordering and thought a bit differently as to which ones are most used. So let’s see what they are and what they do - from number 10 down.
If you are a developer, you probably heard about all of them. However, you may also be surprised of this ordering and thought a bit differently as to which ones are most used. So let’s see what they are and what they do - from number 10 down.
Modules and themes (and engines) would have a namespace such as
namespace drupal\taxonomy;
or
namespace drupal\bartik;
Function prefixes, such as 'taxonomy_' would be dropped.
However, this makes Drupal code really ugly.
Calling functions not in a module from a module would look like this:
\drupal\set_message();
Calling a db function would look like this:
\drupaldb\select('node');
Calling an API function in another module would look like:
\drupal\taxonomy\select_nodes();
The solution?