Location: PHPKode > projects > Neobill > NeoBill0.5.6/widgets/PaymentMethodSelectWidget.class.php
<?php
/**
 * PaymentMethodSelectWidget.class.php
 *
 * This file contains the definition of the PaymentMethodSelectWidget 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
 */

/**
 * PaymentMethodSelectWidget
 *
 * @package SolidWorks
 * @author John Diamond <hide@address.com>
 */
class PaymentMethodSelectWidget extends SelectWidget {
	/**
	 * Get Data
	 *
	 * @param array $config Field configuration
	 * @return array value => description
	 */
	public function getData() {
		global $conf;

		$registry = ModuleRegistry::getModuleRegistry();
		$modules = array_merge( $registry->getModulesByType( "payment_gateway" ),
				$registry->getModulesByType( "payment_processor" ) );

		$methods = array();
		foreach ( $modules as $modulename => $module ) {
			if ( $module->isEnabled() ) {
				$methods[$modulename] = $module->getShortDescription();
			}
		}

		if ( $conf['order']['accept_checks'] ) {
			$methods['Check'] = "[CHECK_OR_MONEY_ORDER]";
		}

		return $methods;
	}
}
?>
Return current item: Neobill