Download the PHP package pozitronik/yii2-grid-config without Composer

On this page you can find all versions of the php package pozitronik/yii2-grid-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-grid-config

GridConfig

Конфигурирование GridView с сохранением настроек каждого пользователя.

Build Status

Installation

The preferred way to install this extension is through composer.

Run

or add

to the require section of your composer.json file.

Requirements

Yii2, PHP >= 7.4.0

Описание и использование

Идея модуля в том, чтобы позволить в рантайме конфигурировать любой экземпляр GridView, сохранить конфигурацию и применить её при следующем рендере GridView. Это достигается тем, что вместо

вызывается

а модуль инжектирует в GridView панель конфигурации и всю обвязку.

Для того, чтобы связать сохраняемые настройки с определённым GridView, потребуется вручную задать идентификатор виджету. Это можно сделать, определив параметр id либо для GridView, либо для GridConfig:

Этого достаточно, чтобы всё заработало.

Настраивать можно набор скрытых/отображаемых колонок, их порядок, пажинацию (количество отображаемых на одной странице записей), наличие плавающего заголовка и плавающего блока с основной информации (если это поддерживает класс GridView).

Поддерживаются как yii\grid\GridView, так и все наследуемые расширения, в т.ч. kartik\grid\GridView.

Версии Bootstrap

Модуль поддерживает Bootstrap третьей (по умолчанию) и четвёртой версий. Переключение между версиями задаётся через параметр Yii::$app->params->bsVersion.

Конфигурация

Для хранения персональных настроек модуль опирается на расширение pozitronik/yii2-users-options. После установки может потребоваться конфигурация этого расширения согласно документации и применение миграции:

yii migrate --migrationPath=@vendor/pozitronik/yii2-users-options/migrations

Конфигурация модуля GridConfig в базовом случае сводится к его подключению в web.php:

Другие настройки модуля:

Порядок применения настроек грида, по увеличению приоритета:

включит фильтрацию по изменению фокуса для всех вызовов GridConfig. Переданный параметр 'filterOnFocusOut' => false

имеет больший приоритет, и перекроет глобальную настройку. Настройка, которую установит себе пользователь имеет самый высший приоритет.

Плавающий заголовок:

При включении плавающего заголовка или плавающего блока с основной информацией (если это поддерживает класс GridView) автоматически задается высота блока в свойстве грида containerOptions. Значение можно переопределить.

Изменение layout GridView

Для базового yii\grid\GridView модуль модифицирует свойство $layout, добавляя к нему отрендеренную кнопку вызова модального окна с настройками. Её расположение изменить нельзя.

Для kartik\grid\GridView модуль добавляет тег {options}, при рендеринге виджета заменяемый на кнопку вызова модального окна с настройками. Этот тег можно использовать в свойстве $layout стандартным способом. По умолчанию он добавляется к $layout автоматически.


All versions of yii2-grid-config with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
pozitronik/yii2-users-options Version ^2.0.0
pozitronik/yii2-traits Version ^1.0.0
kartik-v/yii2-sortable Version dev-master
kartik-v/yii2-widget-switchinput Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pozitronik/yii2-grid-config contains the following files

Loading the files please wait ....