src/widget/GridViewWidget.php 1 location
|
@@ 97-104 (lines=8) @@
|
94 |
|
$data = $args['data']; |
95 |
|
|
96 |
|
if ($data instanceof IQuery) { |
97 |
|
if ($data->objectName) { |
98 |
|
/** @var IModel $cls */ |
99 |
|
$cls = $data->objectName; |
100 |
|
/** @noinspection PhpUndefinedFieldInspection */ |
101 |
|
$data->table = $cls::$tableName; |
102 |
|
} elseif (!$args['data']->table) { |
103 |
|
throw new Exception('Data query not set table or objectName'); |
104 |
|
} |
105 |
|
|
106 |
|
if ($data->having || $data->group) { |
107 |
|
$res = new Query((new Injector)->getDriver()); |
src/widget/ListViewWidget.php 1 location
|
@@ 92-99 (lines=8) @@
|
89 |
|
|
90 |
|
if ($data instanceof IQuery) { |
91 |
|
/** @var IQuery $data */ |
92 |
|
if ($data->objectName) { |
93 |
|
/** @var IModel $cls */ |
94 |
|
$cls = $data->objectName; |
95 |
|
/** @noinspection PhpUndefinedFieldInspection */ |
96 |
|
$data->table = $cls::$tableName; |
97 |
|
} elseif (!$data->table) { |
98 |
|
throw new Exception('Data query not set table or objectName'); |
99 |
|
} |
100 |
|
|
101 |
|
$select = $data->select; |
102 |
|
$orderBy = $data->order; |