final private function getMessageScript() {
		
		$script = '';
		
		if (count($this->messages)) {

			foreach ($this->messages as $m) {
		
				$types = array('info', 'warning', 'error');
				if (!in_array($m->type, $types)) $m->type = 'info';
				$script .= '$.showMessage("' .
					addslashes($m->title) . '","' .
					addcslashes($m->text,"\"\n\r") . '","' . // removes carriage returns and quotes
					addslashes($m->type) . "\");\n";
				
			}
			
		}

		return $script;
		
	}
final private function getMessageScript() {
		
		$script = '';
		
		if (count($this->messages)) {

			foreach ($this->messages as $m) {
		
				$types = array('info', 'warning', 'error');
				if (!in_array($m->type, $types)) $m->type = 'info';
				$script .= '$.showMessage("' .
					addslashes($m->title) . '","' .
					addcslashes($m->text,"\"\n\r") . '","' . // removes carriage returns and quotes
					addslashes($m->type) . "\");\n";
				
			}
			
		}

		return $script;
		
	}
final private function getMessageScript ( ) { $ script = '' ; if ( count ( $ this -> messages ) ) { foreach ( $ this -> messages as $ m ) { $ types = array ( 'info' , 'warning' , 'error' ) ; if ( ! in_array ( $ m -> type , $ types ) ) $ m -> type = 'info' ; $ script .= '$.showMessage("' . addslashes ( $ m -> title ) . '","' . addcslashes ( $ m -> text , "\"\n\r" ) . '","' . // removes carriage returns and quotes addslashes ( $ m -> type ) . "\");\n" ; } } return $ script ; }
Returns javascript code for displaying a front-end user message.

@return string
Returns javascript code for displaying a front - end user message .