1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @namespace |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
namespace Application\Payments; |
8
|
|
|
|
9
|
|
|
use Application\Wallets\Table; |
|
|
|
|
10
|
|
|
use Bluz\Grid\Source\SelectSource; |
|
|
|
|
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Grid based on Table |
14
|
|
|
* |
15
|
|
|
* @package Application\Payments |
16
|
|
|
* |
17
|
|
|
* @author dev |
18
|
|
|
* @created 2017-11-02 11:38:54 |
19
|
|
|
*/ |
20
|
|
|
class Grid extends \Bluz\Grid\Grid |
|
|
|
|
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
protected $uid = 'payments'; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @return void |
29
|
|
|
* @throws \Bluz\Grid\GridException |
30
|
|
|
*/ |
31
|
|
|
public function init(): void |
32
|
|
|
{ |
33
|
|
|
// Current table as source of grid |
34
|
|
|
$adapter = new SelectSource(); |
35
|
|
|
$adapter->setSource(Table::select()); |
36
|
|
|
$adapter->setSource( |
37
|
|
|
Table::select() |
38
|
|
|
->addSelect('users.login as login') |
39
|
|
|
->join('payments', 'transactions', 'transactions', 'transactions.id = payments.transactionId') |
40
|
|
|
->join('transactions', 'users', 'users', 'users.id = transactions.userId') |
41
|
|
|
); |
42
|
|
|
|
43
|
|
|
$this->addAlias('users.id', 'user'); |
44
|
|
|
$this->addAlias('users.login', 'login'); |
45
|
|
|
$this->setAdapter($adapter); |
46
|
|
|
$this->setDefaultLimit(25); |
47
|
|
|
$this->setAllowFilters(['amount', 'currency', 'provider', 'users.id', 'users.login', 'created']); |
48
|
|
|
$this->setAllowOrders(['id', 'amount', 'currency', 'provider', 'users.id', 'users.login', 'created']); |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths