Skeleton for your ZF2 Application backend (Admin part). Build on Admin LTE v2.0.5
Add this project in your composer.json:
"require": {
"t4web/admin": "~2.0.0"
}Now tell composer to download T4web\Admin by running the command:
$ php composer.phar updateEnabling it in your application.config.phpfile.
<?php
return array(
'modules' => array(
// ...
'Sebaks\View',
'Sebaks\ZendMvcController',
'T4web\Admin',
),
// ...
);For normal working Admin module (and beautiful view), you can copy assets to your public:
$ mkdir public/css
$ mkdir public/js
$ mkdir public/img
$ cp -R vendor/t4web/admin/public/css public
$ cp -R vendor/t4web/admin/public/js public
$ cp -R vendor/t4web/admin/public/img publicFor inspiration and build you custom backend you may download whole theme to public/theme
$ mkdir public/theme
$ cd public/theme
$ wget https://github.com/almasaeed2010/AdminLTE/archive/v2.0.5.tar.gz
$ tar -zxvf v2.0.5.tar.gz
$ rm v2.0.5.tar.gzAlmost all backend contain: Dashboard, ability to managing content or custom entities of project, main menu. Managing
content contain: lists (with filters and pagers) and create\read\update forms. This solution provide this. With
T4web\Admin you can build CRUD for your Entities quickly and easy.
For template building we use sebaks\view
We build backend for managing Users (for example) for describe configuration T4web\Admin.
After install we can see empty backend page on uri /admin
For customize main menu, you can override t4web-admin-sidebar-menu for example in your config/autoload/global.php:
'router' => [
'routes' => [
'users-list' => [
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => [
'route' => '/admin/users/list',
'defaults' => [
'controller' => 'Application\Controller\Index',
'action' => 'index',
],
],
],
],
],
'sebaks-view' => [
'blocks' => [
't4web-admin-sidebar-menu' => [
'template' => 't4web-admin/sidebar-menu',
'children' => [
'users-menu-item' => [
'template' => 't4web-admin/sidebar-menu-item',
'variables' => [
'label' => 'Users',
'route' => 'users-list',
'icon' => 'fa-users',
],
],
],
],
],
],
