Create an admin module

In this documentation, we assume that you are an experienced Magento developer that knows how to build a Magento module that is able to display a page in the admin. A basic Magento module with adminhtml behaviour is assumed to be there.

To continue with all examples in this wiki, first build your own Magento module - in this case, called YireoTraining_ExampleAdmin with the following base elements:

  • etc/module.xml module defition file;
  • registration.php module registration file;
  • etc/adminhtml/routes.xml to define your own route in the admin;
  • Backend controller class that renders a page via the XML layout;
  • etc/acl.xml file for proper permissions;
  • Optionally etc/adminhtml/menu.xml file to bring users to your backend page;
  • Optionally composer.json for installing this module via composer;

And last but not least, an XML layout file that allows adding content to your specific page. This is where we kick off the Loki story. Here, we assume this file to be called view/adminhtml/layout/example.xml.

It probably is a good idea to add Loki_AdminComponents and Loki_Components as a module dependency in both your composer.json and etc/module.xml file.

Last modified: September 1, 2025