Creating BO controllers and routes
In the BO, we need two controllers to manage the blog categories and the posts. Therefore, we will create the AdminWHBlogCategoryController
and AdminWHBlogPostController
classes as planned in the design part of this chapter.
Creating AdminWHBlogCategoryController and its routes
Let’s focus on AdminWHBlogCategoryController
first. We can create the controller class as follows:
//namespace and uses are available in the GitHub repository class AdminWHBlogCategoryController extends FrameworkBundleAdminController { private $cache; private $commandBus; public function __construct(CacheProvider $cache, TacticianCommandBusAdapter $commandBus) { $this->cache = $cache; $this->commandBus = $commandBus; } public function listAction(WHBlogCategoryFilter $filters) { return ""...