Exemplo n.º 1
0
 /**
  * All equipment for equipment type
  * @param int $equipmentTypeid
  * @param boolean $onlyIDs [optional]
  * @return \Runalyze\Model\Equipment\Entity[]
  */
 public function equipmentForEquipmentType($equipmentTypeid, $onlyIDs = false)
 {
     $Equipment = array();
     $IDs = $this->DB->Query('SELECT `id` FROM `' . PREFIX . 'equipment` WHERE `typeid`="' . $equipmentTypeid . '"')->fetchAll(\PDO::FETCH_COLUMN);
     if ($onlyIDs) {
         return $IDs;
     }
     foreach ($IDs as $id) {
         $Equipment[] = $this->equipment($id);
     }
     return $Equipment;
 }