Devflow CMF is a framework that allows you to create a CMS for yourself or your clients. Sometimes you may need additional screens. These menu helpers allow you to add menu's to particular sections of the admin sidebar where you need them.

add_admin_submenu()

/**
 * Add an admin submenu page link.
 *
 * Uses admin.submenu.$location.{$menuRoute} filter hook.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $location Submenu location.
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return mixed
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_admin_submenu(
    string $location,
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): mixed;

add_dashboard_submenu()

/**
 * Adds an admin dashboard submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_dashboard_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;

add_sites_submenu()

/**
 * Adds a sites submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string         Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_sites_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;

add_plugins_submenu()

/**
 * Adds a plugin submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string         Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_plugins_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;

add_themes_submenu()

/**
 * Adds a theme submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string         Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_themes_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;

add_users_submenu()

/**
 * Adds a users submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string         Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_users_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;

add_options_submenu()

/**
 * Adds an options submenu page link.
 *
 * @file core/Shared/Helpers/menu.php
 * @param string $menuTitle The text to be used for the menu.
 * @param string $menuRoute The route part of the url.
 * @param string $screen Unique name of menu's screen.
 * @param string|null $permission The permission required for this menu to be displayed to the user.
 * @return false|string         Return the new menu or false if permission is not met.
 * @throws ContainerExceptionInterface
 * @throws Exception
 * @throws NotFoundExceptionInterface
 * @throws ReflectionException
 * @throws TypeException
 * @throws InvalidArgumentException
 */
function add_options_submenu(
    string $menuTitle,
    string $menuRoute,
    string $screen,
    ?string $permission = null
): false|string;