micro/widget/DetailViewWidget.php 1 location
|
@@ 66-72 (lines=7) @@
|
| 63 |
|
|
| 64 |
|
case 'object': |
| 65 |
|
if ($args['data'] instanceof IQuery) { |
| 66 |
|
if ($args['data']->objectName) { |
| 67 |
|
/** @var IModel $cls */ |
| 68 |
|
$cls = $args['data']->objectName; |
| 69 |
|
$args['data']->table = $cls::tableName(); |
| 70 |
|
} elseif (!$args['data']->table) { |
| 71 |
|
throw new Exception('Data query not set table or objectName'); |
| 72 |
|
} |
| 73 |
|
$this->data = $args['data']->run(); |
| 74 |
|
} elseif (is_subclass_of($args['data'], 'Micro\\Mvc\\Models\\Model')) { |
| 75 |
|
$this->data = $args['data']; |
micro/widget/GridViewWidget.php 1 location
|
@@ 92-98 (lines=7) @@
|
| 89 |
|
$this->page = ($this->page < 0) ? 0 : $this->page; |
| 90 |
|
|
| 91 |
|
if ($args['data'] instanceof IQuery) { |
| 92 |
|
if ($args['data']->objectName) { |
| 93 |
|
/** @var IModel $cls */ |
| 94 |
|
$cls = $args['data']->objectName; |
| 95 |
|
$args['data']->table = $cls::tableName(); |
| 96 |
|
} elseif (!$args['data']->table) { |
| 97 |
|
throw new Exception('Data query not set table or objectName'); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
if ($args['data']->having || $args['data']->group) { |
| 101 |
|
$res = new Query($this->container->db); |
micro/widget/ListViewWidget.php 1 location
|
@@ 89-95 (lines=7) @@
|
| 86 |
|
|
| 87 |
|
if ($args['data'] instanceof IQuery) { |
| 88 |
|
/** @var |Query $args ['data'] */ |
| 89 |
|
if ($args['data']->objectName) { |
| 90 |
|
/** @var IModel $cls */ |
| 91 |
|
$cls = $args['data']->objectName; |
| 92 |
|
$args['data']->table = $cls::tableName(); |
| 93 |
|
} elseif (!$args['data']->table) { |
| 94 |
|
throw new Exception('Data query not set table or objectName'); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
$select = $args['data']->select; |
| 98 |
|
|