Menu
Index > Helpers

dealTypesAsList

dealTypesAsList($deal, $options = array())

Description:
Returns a string/list of the DealTypes.

Options:
Not currently employed.

Example:
//
$dealTypesAsList = $this->Deals->dealTypesAsList($deal, $options);
//
echo 'This Deal is associated with these DealTypes: ' . $dealTypesAsList . '.';

/**
 * 
 * 
 *
 * 
 */
	public function dealTypesAsList($deal, $options = array()) {
		//
		$Model		= ClassRegistry::init('DealTypes.DealType');
		//
		$return		= $Model->groupedForList($deal, $options);
		//
		$out		= array();
		//
		if (isset($return['List']) && !empty($return['List'])) {
			//
			$out[]	= 'List: ' . $this->Text->toList($return['List']);
		}
		//
		if (isset($return['Sale']) && !empty($return['Sale'])) {
			//
			$out[]	= 'Sale: ' . $this->Text->toList($return['Sale']);
		}
		//
		return		implode('
', $out); }