public function destroy () { $this->requireParameter("id"); UnitManager::getInstance()->deleteUnit($this->getParameter("id")); return array("data" => null); }
public function getSiPrefixes ($id) { $unit = UnitManager::getInstance()->getUnit($id); $aData = array(); foreach ($unit->getPrefixes() as $prefix) { $aData[] = $prefix->serialize(); } return array("response" => array("totalCount" => count($aData), "data" => $aData)); }