dravencms/base-grid

DravenCMS Base Grid

Maintainers

Package info

github.com/dravencms/base-grid

Type:dravencms-package

pkg:composer/dravencms/base-grid

Transparency log

Statistics

Installs: 198

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

0.2.0 2026-07-01 18:06 UTC

This package is auto-updated.

Last update: 2026-08-24 22:38:35 UTC


README

Shared data-grid factory and column extensions for DravenCMS administration. It builds on Contributte Datagrid 7 and supplies the project defaults used by feature packages.

Features

  • BaseGridFactory for creating configured grids.
  • DravenCMS Grid subclass.
  • Boolean and position columns.
  • Presenter-aware row actions.
  • Czech and English Datagrid translations.

Installation

composer require dravencms/base-grid

The package configuration registers Dravencms\BaseGrid\DI\BaseGridExtension and its translation resources.

Usage

use Dravencms\Components\BaseGrid\BaseGridFactory;
use Dravencms\Components\BaseGrid\Grid;

protected function createComponentGrid(string $name): Grid
{
    $grid = $this->baseGridFactory->create($this, $name);
    $grid->setDataSource($this->repository->getQueryBuilder());
    $grid->addColumnText('name', 'Name')->setSortable();
    return $grid;
}

Datagrid 7 classes use the Contributte\Datagrid namespace. For delete confirmations use Contributte\Datagrid\Column\Action\Confirmation\StringConfirmation; FontAwesome delete actions should use the trash icon name.

License

This package is licensed under the LGPL-3.0 license.