You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 line
1.4KB

  1. <?php
  2. /**
  3. * This is the template for generating the ActiveQuery class.
  4. */
  5. /* @var $this yii\web\View */
  6. /* @var $generator yii\gii\generators\model\Generator */
  7. /* @var $tableName string full table name */
  8. /* @var $className string class name */
  9. /* @var $tableSchema yii\db\TableSchema */
  10. /* @var $labels string[] list of attribute labels (name => label) */
  11. /* @var $rules string[] list of validation rules */
  12. /* @var $relations array list of relations (name => relation declaration) */
  13. /* @var $className string class name */
  14. /* @var $modelClassName string related model class name */
  15. $modelFullClassName = $modelClassName;
  16. if ($generator->ns !== $generator->queryNs) {
  17. $modelFullClassName = '\\' . $generator->ns . '\\' . $modelFullClassName;
  18. }
  19. echo "<?php\n";
  20. ?>
  21. namespace <?= $generator->queryNs ?>;
  22. /**
  23. * This is the ActiveQuery class for [[<?= $modelFullClassName ?>]].
  24. *
  25. * @see <?= $modelFullClassName . "\n" ?>
  26. */
  27. class <?= $className ?> extends <?= '\\' . ltrim($generator->queryBaseClass, '\\') . "\n" ?>
  28. {
  29. /*public function active()
  30. {
  31. return $this->andWhere('[[status]]=1');
  32. }*/
  33. /**
  34. * @inheritdoc
  35. * @return <?= $modelFullClassName ?>[]|array
  36. */
  37. public function all($db = null)
  38. {
  39. return parent::all($db);
  40. }
  41. /**
  42. * @inheritdoc
  43. * @return <?= $modelFullClassName ?>|array|null
  44. */
  45. public function one($db = null)
  46. {
  47. return parent::one($db);
  48. }
  49. }