Download the PHP package gilek/yii2-gtreetable without Composer

On this page you can find all versions of the php package gilek/yii2-gtreetable. 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-gtreetable

Yii2-GTreeTable

Yii2-GTreeTable is extension of Yii 2 framework which is wrapper for bootstrap-gtreetable plugin, on the other hand provides support to server side application.

Thanks to software it's possible to map actual state of nodes to data base.

Test available on demo project.

Installation

Installation is realized by Composer.

In the console write:

or add following line in require section of composer.json file.

One more thing, don't forget about the fxp/composer-asset-plugin installation:

Minimal configuration

Note: You can also use a migrate file and omit following two steps: yii migrate --migrationPath=<app_dir>/vendor/gilek/yii2-gtreetable/migrations

  1. Create table to store nodes:

  2. Add main node:

  3. Create new active record model, based on table described in point 1. It's important that model extend gilek\gtreetable\models\TreeModel class:

  4. Create new controller or add to existing one following actions:

Configuration

Actions

All actions from gilek\gtreetable\actions location have properties:

Model

Support of tree structure in data base is based on Nested set model.

Abstract class gilek\gtreetable\models\TreeModel provides Nested set model on PHP side. It defines validation rules and other required methods. Its configuration can by adjusted by parameters:

View

gilek\gtreetable\views\widget view class consists configuration of CUD operation with reference to nodes source. There is no necessity to use it, but it can be very helpful in simple projects.

Class may be adjusted by properties:

Widget

The main task of gilek\gtreetable\Widget widget is generate parameters to bootstrap-gtreetable plugin and adding required files. When container in not available he also response for creating it. Class has following properties:

Limitations

Yii2-GTreeTable use Nested Set behavior for Yii 2 extension, which in for the moment (Januray 2015) has some limitation regarding ordering main elements (nodes which level = 0).

In case of adding or moving node as the main node, then it will be located after last element in this level. Therefore order of displayed main nodes may not have the same mapping in data base.


All versions of yii2-gtreetable with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0
yiisoft/yii2-bootstrap Version ^2.0
yiisoft/yii2-jui Version ^2.0
creocoder/yii2-nested-sets Version ~0.9
bower-asset/bootstrap-gtreetable Version ^2.0
bower-asset/urijs Version ^1.19
bower-asset/jquery.browser Version 0.1.0
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 gilek/yii2-gtreetable contains the following files

Loading the files please wait ....