Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-Side Export #28

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a4bca24
Added new feature: using model methods for table render with custom f…
mzf Feb 3, 2016
72bdd88
Added possibility to getting values only from item method, thats not …
mzf Feb 4, 2016
8a2b8f4
Changed a method of obtaining list of columns.
mzf Feb 9, 2016
1341d83
Fixed error arising by search in the table that having fake field
mzf Feb 18, 2016
ef8affb
Travis-CI fix
mzf Feb 18, 2016
f423321
Merge pull request #1 from mzf/master
stefanchiriac Nov 5, 2016
441cd9f
add multi models search
Nov 13, 2016
33a240e
fix and add tests, fix column parsing
Nov 14, 2016
ca207e4
adding implementation example
Nov 16, 2016
7a8e17b
Merge remote-tracking branch 'origin/search_multiple_models'
Nov 17, 2016
b8e431b
merge fixes for search bypasses conditions and case insensitivity search
Nov 17, 2016
6129d93
update readme and composer.json
Nov 19, 2016
769a687
fix tests
Nov 19, 2016
a581156
travis git clone phalcon 3.0.1
Nov 19, 2016
b1c1887
Update .travis.yml
stefanchiriac Nov 19, 2016
898c1cd
revert travis gitclone to 1.3.4
stefanchiriac Nov 19, 2016
4fbba6a
fix stub
Nov 19, 2016
d495378
Merge remote-tracking branch 'origin/master'
Nov 19, 2016
4b1c9ad
Merge pull request #1 from magnxpyr/master
assadnazar Nov 29, 2019
629ce1f
updated code for use in phalcon version 4
assadnazar Nov 29, 2019
7cfd894
edited composer namespace
assadnazar Nov 29, 2019
9b874b0
edited composer namespace
assadnazar Nov 29, 2019
5059a03
Merge branch 'master' of https://github.com/assadnazar/phalcon-datata…
assadnazar Nov 29, 2019
df01718
dev alias changed to 1.1-dev
assadnazar Nov 29, 2019
e48623e
reverted version alias
assadnazar Nov 29, 2019
dc7ec04
branch alias
assadnazar Nov 29, 2019
d74da62
Update README.md
assadnazar Nov 29, 2019
136bda4
Added Excel and PDF Export Options
assadnazar Mar 7, 2020
e5fded9
require phpspreadsheet and mpdf
assadnazar Mar 7, 2020
33f5d12
Export Feature Description Added
assadnazar Mar 7, 2020
929fdab
Updated Export Features
assadnazar Mar 7, 2020
56eb70e
Update DataTable.php
assadnazar Mar 26, 2020
37cea85
Update DataTable.php
assadnazar Mar 26, 2020
abecda1
Bracket
assadnazar Mar 26, 2020
2de5d52
Update DataTable.php
assadnazar Mar 26, 2020
1a06653
Update DataTable.php
assadnazar Mar 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adding implementation example
Stefan Chiriac committed Nov 16, 2016
commit ca207e41b2ace368b7fe40a84a7ceb8646df03e6
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ This is a [Phalcon Framework](http://phalconphp.com/) adapter for [DataTables](h
* Ordering
* Multiple column ordering
* Column-based search
* Multi model search

# Installation
### Installation via Composer
@@ -91,6 +92,32 @@ class TestController extends \Phalcon\Mvc\Controller {
}
```

### Controller (using multi models):
```php
<?php
use \DataTables\DataTable;

class TestController extends \Phalcon\Mvc\Controller {
public function indexAction() {
if ($this->request->isAjax()) {
$builder = $this->modelsManager->createBuilder()
->columns('u.id, u.name, u.email, u.name as role_name')
->addFrom('Example\Models\User', 'u')
->addFrom('Example\Models\Role', 'r')
->where('u.role_id = r.id')

$dataTables = new DataTable();
$dataTables->fromBuilder($builder)->sendResponse();

// or pass an array of columns to the builder
$columns = ['u.id', 'u.name', 'u.email', ['u.name', 'alias' => 'role_name']];
$dataTables = new DataTable();
$dataTables->fromBuilder($builder, $columns)->sendResponse();
}
}
}
```

### Model:
```php
<?php
@@ -99,9 +126,17 @@ class TestController extends \Phalcon\Mvc\Controller {
* @property string name
* @property string email
* @property float balance
* @property integer role_id
*/
class User extends \Phalcon\Mvc\Model {
}

/**
* @property integer id
* @property string name
*/
class Role extends \Phalcon\Mvc\Model {
}
```

### View: