Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maslo2017/phalcon-data-table
phalcon-data-table libiray
https://github.com/maslo2017/phalcon-data-table
Last synced: 3 months ago
JSON representation
phalcon-data-table libiray
- Host: GitHub
- URL: https://github.com/maslo2017/phalcon-data-table
- Owner: maslo2017
- Created: 2019-05-05T10:56:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T11:07:14.000Z (over 5 years ago)
- Last Synced: 2024-04-10T05:45:46.767Z (7 months ago)
- Language: PHP
- Size: 18.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-phalcon - phalcon-data-table - Allows you to simplify the interaction with the bootstrap-table in the Phalcon (Miscellaneous)
README
# phalcon-data-table
This library allows you to simplify the interaction with the [bootstrap-table](https://examples.bootstrap-table.com)
in the [Phalcon](https://github.com/phalcon/cphalcon)## Install
```php
$loader = new \Phalcon\Loader();$loader->registerNamespaces(
[
'Masvp' => APP_PATH.'/library/',
]);
$loader->registerDirs(
[
APP_PATH.'/library/',
]);
```## Sample
**php**
```php
$model = new ResetPasswords();$creator = new MySqlCreater($model, [
'columns' => 'id,usersId,ipAddress,type,createdAt',
's_columns' => 'ipAddress',
'conditions' => ['usersId = :user_id_con:'],
'bind' => ['user_id_con' => $user->id],
'data' => $this->request->getPost(),
]);return $this->response->setJsonContent($creator->getResult());
```
**html**
```html```
**javascript**
```javascript
$('#table-reset-passwords').bootstrapTable('destroy').bootstrapTable({
locale : 'ru-RU',
filter : true,
columns: [
{
field : 'id',
title : 'ID',
sortable : true,
align : 'center',
},
{
field : 'userId',
title : 'User ID',
sortable : true,
align : 'center',
},
{
field : 'ipAddress',
title : 'IP',
sortable : false,
align : 'center',
filter: {
type:'input'
},
}, {
field : 'type',
title : 'Type',
sortable : false,
align : 'center'
}, {
field : 'createdAt',
title : 'Date',
sortable : true,
align : 'center',
formatter: unixTimeFormater,
},
],
});
```
![Simple result table](table-simple.jpg "Simple result table")## Documentation
[information](/Documentation.md)[bootstrap-table documentation](https://bootstrap-table.com/docs/getting-started/introduction/)
[bootstrap-table select2 filter](https://bootstrap-table.com/docs/extensions/select2-filter/)