t4web/admin

ZF2 Admin module

Installs: 377

Dependents: 2

Suggesters: 3

Security: 0

Stars: 2

Watchers: 4

Forks: 0

Open Issues: 2

Language:CSS

2.0.4 2016-12-09 07:37 UTC

This package is auto-updated.

Last update: 2024-10-26 18:28:02 UTC


README

Skeleton for your ZF2 Application backend (Admin part). Build on Admin LTE v2.0.5

Contents

Installation

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 update

Post installation

Enabling it in your application.config.phpfile.

<?php
return array(
    'modules' => array(
        // ...
        'Sebaks\View',
        'Sebaks\ZendMvcController',
        'T4web\Admin',
    ),
    // ...
);

Css, Js, fonts and images

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 public

Original theme

For 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.gz

Introduction

Almost 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 empty backend page

Main menu

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',
                    ],
                ],
            ],
        ],
    ],
],

Result: Admin menu item