/**
  * Overrode findAll to include condition also if needed
  * @inheritdoc
  */
 public static function findAll($condition = null)
 {
     if (!empty($condition)) {
         return parent::findAll($condition);
     }
     return self::find()->all();
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public static function findAll($condition = null)
 {
     if (is_null($condition)) {
         return static::find()->all();
     } else {
         return parent::findAll($condition);
     }
 }
Beispiel #3
0
 /**
  * 查询数据
  */
 public function findDate($level, $parent_id)
 {
     return parent::findAll(['level' => $level, 'parent_id' => $parent_id]);
 }