Addons in the Backend - Vanilla Success
<main> <article class="userContent"> <p>If you <a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc">create an addon with an </a><a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc"><code class="code codeInline" spellcheck="false" tabindex="0">addon.json</code></a><a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc"> file</a> you have a bit of Vanilla that can be toggled on and off. Addons bring a lot to the table in the backend beyond this little bit of user interface though.</p><h2 data-id="creating-php-classes-in-an-addon">Creating PHP Classes in an Addon</h2><div class="js-embed embedResponsive" data-embedjson="{"body":"Addons use a special, optimized autoloader besides composer. As a result addons can be a little more flexible with their names, but it is still recommended to treat them as if they are PSR-4 style. You may find some addons not respecting this convention. If you'd like to rename some be sure to follow through with a…","photoUrl":"https:\/\/us.v-cdn.net\/6030677\/uploads\/VWGAXAF5OFCO\/microsoftteams-image.png","url":"https:\/\/success.vanillaforums.com\/kb\/articles\/508-creating-php-classes-in-an-addon","embedType":"link","name":"Creating PHP Classes in an Addon - Vanilla Success"}"> <a href="https://success.vanillaforums.com/kb/articles/508-creating-php-classes-in-an-addon" rel="nofollow noreferrer ugc"> https://success.vanillaforums.com/kb/articles/508-creating-php-classes-in-an-addon </a> </div><h2 data-id="configuring-the-container-in-an-addon">Configuring the Container in an Addon</h2><div class="js-embed embedResponsive" data-embedjson="{"body":"Vanilla makes heavy use of a dependency injection container. This document outlines how to configure it through an addon. Creating a ContainerRules Class This is the preferred way to configure an addon since the 2021.024 release. Create a new class in the Addon namespace of your addon. For example the dashboard container…","photoUrl":"https:\/\/us.v-cdn.net\/6030677\/uploads\/VWGAXAF5OFCO\/microsoftteams-image.png","url":"https:\/\/success.vanillaforums.com\/kb\/articles\/509-configuring-the-container-in-an-addon","embedType":"link","name":"Configuring the Container in an Addon - Vanilla Success"}"> <a href="https://success.vanillaforums.com/kb/articles/509-configuring-the-container-in-an-addon" rel="nofollow noreferrer ugc"> https://success.vanillaforums.com/kb/articles/509-configuring-the-container-in-an-addon </a> </div><p><br></p> </article> </main>