Menu
Index > Helpers

todoValueLabel

todoValueLabel($todo_value)

Description:
Returns a string.

Options:

Example:
//
$todoValueLabel = $this->Deals->todoValueLabel($todo_value);
//
echo 'This Todo is labeled ' . $todoValueLabel . '.';

	public function todoValueLabel($todoValue) {
		//
		return		isset($todoValue['name']) && strlen($todoValue['name']) > 0
			 	? trim($todoValue['name'])
			 	: (isset($todoValue['Todo']['name']) && strlen($todoValue['Todo']['name']) > 0
			 		? $todoValue['Todo']['name']
			 		: ''
			 	);
	}