If you grab the latest version of pestle (updated minutes ago) you should be able to use the following set of commands to create a base module with a working admin route.
$ pestle.phar generate_module Pulsestorm HelloAdminPestle2 0.0.1
$ php bin/magento module:enable Pulsestorm_HelloAdminPestle2
$ php bin/magento setup:upgrade
$ pestle.phar generate_route Pulsestorm_HelloAdminPestle2 adminhtml pulsestorm_hello_admin_pestle2
$ pestle.phar generate_acl Pulsestorm_HelloAdminPestle2 Pulsestorm_HelloAdminPestle2::top,Pulsestorm_HelloAdminPestle2::menu_1
$ pestle.phar generate_menu Pulsestorm_HelloAdminPestle2 Magento_Backend::system_other_settings Pulsestorm_HelloAdminPestle2::a_menu_item Pulsestorm_HelloAdminPestle2::menu_1 "Hello Admin Pestle" pulsestorm_hello_admin_pestle2/index/index 1
$ pestle.phar generate_view Pulsestorm_HelloAdminPestle2 adminhtml pulsestorm_hello_admin_pestle2_index_index Main content.phtml ""
Previous versions of pestle could get you part of the way there, but a few adjustments (no layout=""
attribute in adminhtml handle XML files, different admin block base class, removing block input from generate_view
) needed to be made for admin generation to work.
If you’re curious about what the above commands are doing,
$ pestle.phar help command_name
Will give you the argument names and (in some cases) help text. A lot is covered in my recent Understanding Access Control List Rules and Admin Menu Items, and my next article will cover creating an route and view files in the admin (generate_route
and generate_view
above)