/** * Returns an array of names of database entries for a given type. * @param String $type The type of record to return * @return Array An array with id=>name of records for the type provided */ protected function parseType($type) { switch($type) { case 'contacts': return ContactChild::getAllNames(); case 'projects': return ProjectChild::getNames(); case 'accounts': return AccountChild::getNames(); case 'cases': return CaseChild::getNames(); case 'sales': return SaleChild::getNames(); default: return array('0'=>'None'); } }