Skip to content

Commit

Permalink
Dropped getList() method in Command, ActiveQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Feb 26, 2016
1 parent b75495c commit 4cf1bce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
29 changes: 0 additions & 29 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,33 +410,4 @@ public function column($field, $db = null)

return parent::column($field, $db);
}

/**
* @deprecated Do not use, will be dropped soon.
*/
public function getList($as_array = true, $db = null, $options = [])
{
$rawResult = $this->createCommand($db)->getList($options);
foreach ($rawResult as $k => $v) {
$result[] = ['gl_key' => $k, 'gl_value' => $v];
}
if (!empty($result) && !$this->asArray) {
$models = $this->createModels($result);
if (!empty($this->with)) {
$this->findWith($this->with, $models);
}
foreach ($models as $model) {
$model->afterFind();
}
$result = $models;
}
if (empty($result)) {
$result = [];
}

// return $this->createCommand($db)->getList($options);
return $as_array ? ArrayHelper::map($result, 'gl_key', function ($o) {
return Yii::t('app', $o->gl_value);
}) : $result;
}
}
9 changes: 0 additions & 9 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ public function search($options = [])
return $this->db->post($url, $options);
}

public function getList($options = [])
{
$options = array_merge($this->queryParts, $options);
$command = $this->index . 'GetList';
$result = $this->db->post($command, $options);

return $result;
}

public function insert($action, $data, $id = null, $options = [])
{
$options = array_merge($data, $options);
Expand Down

0 comments on commit 4cf1bce

Please sign in to comment.