|
@@ 266-268 (lines=3) @@
|
| 263 |
|
*/ |
| 264 |
|
public function autosearch() { |
| 265 |
|
switch ($this->input->post('queryString')) { |
| 266 |
|
case 'product': |
| 267 |
|
$entity = SProductsQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->filterByActive(true)->withColumn('SProductsI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 268 |
|
break; |
| 269 |
|
case 'shop_category': |
| 270 |
|
$entity = SCategoryQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->withColumn('SCategoryI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 271 |
|
break; |
|
@@ 269-271 (lines=3) @@
|
| 266 |
|
case 'product': |
| 267 |
|
$entity = SProductsQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->filterByActive(true)->withColumn('SProductsI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 268 |
|
break; |
| 269 |
|
case 'shop_category': |
| 270 |
|
$entity = SCategoryQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->withColumn('SCategoryI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 271 |
|
break; |
| 272 |
|
case 'brand': |
| 273 |
|
$entity = SBrandsQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->withColumn('SBrandsI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 274 |
|
break; |
|
@@ 272-274 (lines=3) @@
|
| 269 |
|
case 'shop_category': |
| 270 |
|
$entity = SCategoryQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->withColumn('SCategoryI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 271 |
|
break; |
| 272 |
|
case 'brand': |
| 273 |
|
$entity = SBrandsQuery::create()->setComment(__METHOD__)->joinWithI18n($this->def_locale)->withColumn('SBrandsI18n.Name', 'Name')->select(['Id', 'Name'])->find()->toArray(); |
| 274 |
|
break; |
| 275 |
|
case 'category': |
| 276 |
|
$entity = $this->db->select('id as Id')->select('name as Name')->get('category')->result_array(); |
| 277 |
|
break; |