2017 © Pedro Peláez
 

library admin

ZF2 Admin module

image

t4web/admin

ZF2 Admin module

  • Friday, December 9, 2016
  • by maxgu
  • Repository
  • 3 Watchers
  • 2 Stars
  • 353 Installations
  • CSS
  • 2 Dependents
  • 3 Suggesters
  • 0 Forks
  • 2 Open issues
  • 12 Versions
  • 2 % Grown

The README.md

Admin

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

Contents

Installation

Add this project in your composer.json:, (*2)

"require": {
    "t4web/admin": "~2.0.0"
}

Now tell composer to download T4web\Admin by running the command:, (*3)

$ php composer.phar update

Post installation

Enabling it in your application.config.phpfile., (*4)

<?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:, (*5)

$ 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, (*6)

$ 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., (*7)

For template building we use sebaks\view, (*8)

We build backend for managing Users (for example) for describe configuration T4web\Admin., (*9)

After install we can see empty backend page on uri /admin empty backend page, (*10)

For customize main menu, you can override t4web-admin-sidebar-menu for example in your config/autoload/global.php:, (*11)

'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, (*12)

The Versions