OperationalAdjustmentsRelateToSourceDataService.php 835 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace common\services;
  3. use common\models\OperationalAdjustmentsRelateToSourceData;
  4. use yii\db\ActiveQuery;
  5. class OperationalAdjustmentsRelateToSourceDataService
  6. {
  7. /**
  8. * return OperationalAdjustmentsRelateToSourceData::find();
  9. * @return ActiveQuery
  10. */
  11. public static function getQuery(): ActiveQuery
  12. {
  13. return OperationalAdjustmentsRelateToSourceData::find();
  14. }
  15. /**
  16. * return OperationalAdjustmentsRelateToSourceData::find()->andWhere(["emergency_response_id" => $emergencyResponseId])
  17. * @param $operationalAdjustmentsId
  18. * @return ActiveQuery
  19. */
  20. public static function getQueryByEmergencyResponseId($operationalAdjustmentsId): ActiveQuery
  21. {
  22. return self::getQuery()->andWhere(["operational_adjustments_id" => $operationalAdjustmentsId]);
  23. }
  24. }