Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 198a004

Browse files
author
Steffen
committed
options added
1 parent 2f91ea3 commit 198a004

File tree

10 files changed

+925
-20
lines changed

10 files changed

+925
-20
lines changed

.travis.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ language: php
22

33
sudo: false
44

5-
php:
6-
- 5.3
7-
- 5.4
8-
- 5.6
9-
- 7.0
10-
- hhvm
5+
services:
6+
- mysql
117

128
cache:
139
directories:
@@ -16,21 +12,18 @@ cache:
1612
matrix:
1713
fast_finish: true
1814
include:
19-
- php: 5.3
20-
env: COMPOSER_FLAGS="--prefer-lowest"
15+
- php: 5.5
2116
- php: 5.6
22-
env: SYMFONY_VERSION=2.6.*
23-
- php: 5.6
24-
env: SYMFONY_VERSION=2.7.*
25-
- php: 5.6
26-
env: SYMFONY_VERSION=2.8.*
27-
- php: 5.6
28-
env: SYMFONY_VERSION=3.0.*
17+
- php: 7.0
18+
- php: hhvm
2919
allow_failures:
3020
- php: hhvm
3121

22+
env:
23+
- SYMFONY_VERSION="3.0.*" DB=mysql
24+
3225
before_install:
33-
- composer selfupdate
26+
- composer self-update
3427
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
3528

3629
install: composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

Datatable/AbstractDatatable.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ abstract class AbstractDatatable implements DatatableInterface
7878
*/
7979
protected $ajax;
8080

81+
/**
82+
* An Options instance.
83+
*
84+
* @var Options
85+
*/
86+
protected $options;
87+
8188
//-------------------------------------------------
8289
// Ctor.
8390
//-------------------------------------------------
@@ -111,6 +118,7 @@ public function __construct(
111118
$this->columnBuilder = new ColumnBuilder($em, $metadata);
112119

113120
$this->ajax = new Ajax();
121+
$this->options = new Options();
114122
}
115123

116124
//-------------------------------------------------
@@ -133,6 +141,14 @@ public function getAjax()
133141
return $this->ajax;
134142
}
135143

144+
/**
145+
* {@inheritdoc}
146+
*/
147+
public function getOptions()
148+
{
149+
return $this->options;
150+
}
151+
136152
//-------------------------------------------------
137153
// Private
138154
//-------------------------------------------------

Datatable/Ajax.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class Ajax
2222
{
2323
use OptionsTrait;
2424

25+
//-------------------------------------------------
26+
// DataTables - Ajax/Data
27+
//-------------------------------------------------
28+
2529
/**
2630
* URL set as the Ajax data source for the table.
2731
*

Datatable/Column/AbstractColumn.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace Sg\DatatablesBundle\Datatable\Column;
1313

14-
use Closure;
15-
use Exception;
16-
use JsonSerializable;
1714
use Sg\DatatablesBundle\Datatable\OptionsTrait;
15+
1816
use Symfony\Component\OptionsResolver\OptionsResolver;
17+
use JsonSerializable;
18+
use Closure;
19+
use Exception;
1920

2021
/**
2122
* Class AbstractColumn

Datatable/DatatableInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ public function getColumns();
3939
*/
4040
public function getAjax();
4141

42+
/**
43+
* Get Options instance.
44+
*
45+
* @return Options
46+
*/
47+
public function getOptions();
48+
4249
/**
4350
* Returns the name of the entity.
4451
*

0 commit comments

Comments
 (0)