$locationTypes = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Event', 'location_type_id', array('flip' => TRUE)); // Returns an array of location types with their id and name, which can be used in a select dropdown for selecting the location type of an event.
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('flip' => TRUE)); // Returns an array of location types with their id and name, which can be used in a select dropdown for selecting the location type of a contact address.Package library: CiviCRM\Core\PseudoConstant