2017 © Pedro Peláez
 

library lemo-grid

image

matycz/lemo-grid

  • Monday, February 19, 2018
  • by MatyCZ
  • Repository
  • 5 Watchers
  • 7 Stars
  • 1,400 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 14 Open issues
  • 70 Versions
  • 5 % Grown

The README.md

LemoGrid Module for Laminas

The LemoGrid module provides building of data grids similar to Laminas Form quickly and easily for many platforms., (*1)

Supported plaforms

Supported data adapters

Features / Goals

  • Add column Concat [In progress]
  • Add column Route [In progress]
  • Write documentation
  • Write tests

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*2)

Installation steps

  1. cd my/project/directory
  2. Create a composer.json file with following contents:, (*3)

    json { "require": { "matycz/lemo-grid": "0.*" } }, (*4)

  3. Run php composer.phar install
  4. Open my/project/directory/config/application.config.php and add following keys to your modules, (*5)

    php 'LemoGrid',, (*6)

Installation without composer is not officially supported, and requires you to install and autoload the dependencies specified in the composer.json., (*7)

Examples

 array(
                'Foo\Controller\Bar' => function($controllerManager) {
                    $controller = new Controller\BarController();
                    $controller->setGridBar($controllerManager->getServiceLocator()->get('Foo\Grid\Bar'));
                    $controller->setServiceBar($controllerManager->getServiceLocator()->get('Foo\Service\Bar'));
                    return $controller;
                },
            )
        );
    }

    /**
     * @inheritdoc
     */
    public function getGridConfig()
    {
        return array(
            'factories' => array(
                'Foo\Grid\Bar' => function () {
                    $grid = new Grid\Bar();
                    return $grid;
                },
            )
        );
    }
    
    /**
     * @inheritdoc
     */
    public function getServiceConfig()
    {
        return array(
            'factories' => array(
                'Foo\Service\Bar' => function ($serviceManager) {
                    $service = new Service\Bar($serviceManager);
                    $service->setEntityManager($serviceManager->get('Doctrine\ORM\EntityManager'));
                    return $service;
                },
            ),
        );
    }

    ...
}
```

```php
setQueryBuilder($this->getServiceBar()->getQueryBuilderInstanceForGrid());

        $platform = new \LemoGrid\Platform\JqGrid();

        $grid = $this->getGridBar();
        $grid->setAdapter($adapter);
        $grid->setPlatform($platform);
        $grid->setParams($this->params()->fromQuery());

        return new ViewModel(array(
            'grid' => $grid
        ));
    }
    
    ...
    
    /**
     * @param  GridBar $gridBar
     * @return BarController
     */
    public function setGridBar(GridBar $gridBar)
    {
        $this->gridBar = $gridBar;

        return $this;
    }

    /**
     * @return GridBar
     */
    public function getGridBar()
    {
        return $this->gridBar;
    }
    
    /**
     * @param  ServiceBar $serviceBar
     * @return BarController
     */
    public function setServiceBar(ServiceBar $serviceBar)
    {
        $this->serviceBar = $serviceBar;

        return $this;
    }

    /**
     * @return ServiceBar
     */
    public function getServiceBar()
    {
        return $this->serviceBar;
    }
}
```

```php
getEntityManager()->createQueryBuilder()
            ->select(array('rootAlias'))
            ->from('Foo\Entity\Bar', 'rootAlias');

        return $qb;
    }
    
    /**
     * Set entity manager
     *
     * @param  EntityManager $entityManager
     * @return Bar;
     */
    public function setEntityManager(EntityManager $entityManager)
    {
        $this->entityManager = $entityManager;
        return $this;
    }

    /**
     * Get entity manager
     *
     * @return EntityManager
     */
    public function getEntityManager()
    {
        return $this->entityManager;
    }
}
```

```php
setName('GridBar');

        // NAME
        $this->add(array(
            'name' => 'name',
            'type' => 'text',
            'identifier' => 'rootAlias.name',
            'attributes' => array(
                'label' => 'Name',
                'width' => '70',
            )
        ));

        // VERSION
        $this->add(array(
            'name' => 'version',
            'type' => 'text',
            'identifier' => 'rootAlias.version',
            'attributes' => array(
                'label' => 'Version',
                'width' => '20',
            )
        ));

        // EDIT
        $this->add(array(
            'name' => 'edit',
            'type' => 'route',
            'options' => array(
                'text' => '',
                'template' => '%s',
                'route' => 'foo/bar',
                'params' => array(
                    'action' => 'edit',
                    'id' => '%rootAlias.id%'
                ),
                'reuseMatchedParams' => true,
            ),
            'attributes' => array(
                'width' => '5',
                'align' => 'center',
                'isSortable' => false,
                'isSearchable' => false,
            )
        ));

        // DELETE
        $this->add(array(
            'name' => 'delete',
            'type' => 'route',
            'options' => array(
                'text' => '',
                'template' => '%s',
                'route' => 'foo/bar',
                'params' => array(
                    'action' => 'delete',
                    'id' => '%rootAlias.id%'
                ),
                'reuseMatchedParams' => true,
            ),
            'attributes' => array(
                'width' => '5',
                'align' => 'center',
                'isSortable' => false,
                'isSearchable' => false,
            )
        ));
    }
}

```

```php
headLink()->appendStylesheet('/css/jqGrid/jqGrid.css');
$this->headScript()->appendFile('/js/jqGrid/jqGrid.js');
?>


= $this->jqgrid($this->grid) ?>

The Versions

17/03 2016

1.9.1

1.9.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

03/03 2016

1.9.0

1.9.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/02 2016

1.8.10

1.8.10.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/02 2016

1.8.9

1.8.9.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

22/01 2016

1.8.8

1.8.8.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

16/09 2015

1.8.7

1.8.7.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

03/09 2015

1.8.6

1.8.6.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

27/08 2015

1.8.5

1.8.5.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

27/08 2015

1.8.4

1.8.4.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/08 2015

1.8.3

1.8.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/08 2015

1.8.2

1.8.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/08 2015

1.8.1

1.8.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/08 2015

1.8.0

1.8.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

06/08 2015

1.7.3

1.7.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

05/08 2015

1.7.2

1.7.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

04/08 2015

1.7.1

1.7.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

04/08 2015

1.7.0

1.7.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

21/07 2015

1.6.8

1.6.8.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

21/07 2015

1.6.7

1.6.7.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

17/07 2015

1.6.6

1.6.6.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

06/03 2015

1.6.5

1.6.5.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

13/02 2015

1.6.4

1.6.4.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

20/01 2015

1.6.3

1.6.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

14/01 2015

1.6.2

1.6.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/01 2015

1.6.1

1.6.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/01 2015

1.6.0

1.6.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/12 2014

1.5.5

1.5.5.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/12 2014

1.5.4

1.5.4.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

05/12 2014

1.5.3

1.5.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

04/12 2014

1.5.1

1.5.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

04/12 2014

1.5.2

1.5.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

03/12 2014

1.5.0

1.5.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

18/11 2014

1.4.1

1.4.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

13/11 2014

1.4.0

1.4.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

21/10 2014

1.3.2

1.3.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

07/10 2014

1.3.1

1.3.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

17/09 2014

1.3.0

1.3.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

08/09 2014

1.2.1

1.2.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

02/09 2014

1.2.0

1.2.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

22/07 2014

1.1.5

1.1.5.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

17/07 2014

1.1.4

1.1.4.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

17/07 2014

1.1.3

1.1.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

15/07 2014

1.1.2

1.1.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

14/07 2014

1.1.1

1.1.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

14/07 2014

1.1

1.1.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/07 2014

1.0.9

1.0.9.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

24/06 2014

1.0.8

1.0.8.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

12/06 2014

1.0.7

1.0.7.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

10/06 2014

1.0.6

1.0.6.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

20/05 2014

1.0.5

1.0.5.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

05/05 2014

1.0.4

1.0.4.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

02/05 2014

1.0.3

1.0.3.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

25/04 2014

1.0.2

1.0.2.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

21/02 2014

1.0.1

1.0.1.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid

13/01 2014

1.0.0

1.0.0.0 https://github.com/MatyCZ/LemoGrid

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 jqgrid