public function search()
{
$criteria = new CDbCriteria();
$criteria->compare('id', $this->id);
$criteria->compare('name', $this->name, true);
$criteria->compare('title', $this->title, true);
$criteria->compare('type', $this->type);
$criteria->compare('group_id', $this->group_id);
$criteria->compare('is_filter', $this->is_filter);
$criteria->compare('required', $this->required);
$sort = new CSort();
$sort->defaultOrder = 't.sort DESC';
$sort->attributes = ['*', 'title' => ['asc' => 'title', 'desc' => 'title DESC']];
return new CActiveDataProvider($this, ['criteria' => $criteria, 'sort' => $sort]);
}