<?php
/**
* HostingSelectWidget.class.php
*
* This file contains the definition of the HostingSelectWidget class.
*
* @package SolidWorks
* @author John Diamond <hide@address.com>
* @copyright John Diamond <hide@address.com>
* @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
*/
/**
* HostingSelectWidget
*
* @package SolidWorks
* @author John Diamond <hide@address.com>
*/
class HostingSelectWidget extends SelectWidget {
/**
* Get Data
*
* @return array value => description
*/
function getData() {
// Query HostingServiceDBO's
$hostings = array();
try {
// Convery to an array: hosting ID => hosting service name
$where = $this->fieldConfig['publicitemsonly'] ? "public='Yes'" : null;
$hostingDBOs = load_array_HostingServiceDBO( $where );
foreach ( $hostingDBOs as $hostingDBO ) {
$hostings[$hostingDBO->getID()] = $hostingDBO->getTitle();
}
}
catch( DBNoRowsFoundException $e ) {
}
return $hostings;
}
}
?>