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.

UnitStore.php 936B

3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Config;
  3. use Lc\SovBundle\Repository\AbstractStore;
  4. class UnitStore extends AbstractStore
  5. {
  6. protected UnitRepositoryQuery $query;
  7. public function __construct(UnitRepositoryQuery $query)
  8. {
  9. $this->query = $query;
  10. }
  11. public function getAsArray()
  12. {
  13. $query = $this->query->create();
  14. foreach ($query->find() as $unit) {
  15. $unitsList[$unit->getId()]['unit'] = $unit->getUnit();
  16. $unitsList[$unit->getId()]['wordingUnit'] = $unit->getWordingUnit();
  17. $unitsList[$unit->getId()]['wording'] = $unit->getWording();
  18. $unitsList[$unit->getId()]['wordingShort'] = $unit->getWordingShort();
  19. $unitsList[$unit->getId()]['coefficient'] = $unit->getCoefficient();
  20. $unitsList[$unit->getId()]['unitReference'] = $unit->getUnitReference()->getId();
  21. }
  22. return $unitsList;
  23. }
  24. }