[TYPO3-mvc] extbase: definition and output of a model function

Kerstin Eitner eitner.kerstin at googlemail.com
Thu Mar 1 11:30:01 CET 2012


Hi there,

i've got a question concerning the definition and output of a model 
function.

E.g.
In my Event-Model i've got a function that calculates the number of free 
vacancies.

public function getFreevacancies() {
	...
	return $result;
}

How can i call the function in my Event-View?

I've determined that I have to declare a variable in my model 
($freevacancies) and then i can output that in my view like
{event.freevacancies}.


Is that the right way or how is this done correctly?



Thanks in advance!

Greetz
Kerstin


More information about the TYPO3-project-typo3v4mvc mailing list