<?php

/**
 * Modelo de Enum para controller e view
 * @author fabricio
 * 
 * na View:
 * echo $this->Form->input('status', array('options' => StatusCredit::status()))
 * 
 * no Controller:
 * if ($this->data['StatusCredit']['status'] == StatusCredit::STATUS_PENDING)) {...}
 * 
 */
class StatusTextMessages extends Component {

	const STATUS_PENDING = 0; 
	const STATUS_COMPLETED = 1;
	
	/* 
	 * @access static
	 */
	public static function status($value = null) {
		$options = array(
				self::STATUS_PENDING => __('statusPending',true),
				self::STATUS_COMPLETED => __('statusCompleted',true),
		);
		return parent::enum($value, $options);
	}
	
}