How to get all Element Types? From within a plugin/module using PHP; is there a way to query all element types being used, including custom elements?
I know in the elements database table there is a type column that I could potentially query. But I wasn't sure if there is a native Craft method I could take advantage of instead?
In an ideal world I just need an array of all the element types:
Example:
['asset', 'category', 'entry', 'globalset', 'matrixblock', 'tag', 'user', 'single', 'event', 'product']```
Ok, I found this:
https://docs.craftcms.com/api/v3/craft-services-elements.html#method-getallelementtypes
Craft::$app-&gt;getElements()-&gt;getAllElementTypes()