Example 1

1. Add the following code into your typoscript.

2. The fileadmin/image_slider.php file has the following content.

3. Add the following script in typo3 template for showing the returned data from homeImages().

Here,

USER_INT is a user defined cObjects, which can call a function or method.

userFunc is the name of a function that we call.

Example 2 – Using php class methods.

1. Typoscript will look like this

 

2. fileadmin/image_slider.php file contents.

 

3. Add the following script in typo3 template.