[TYPO3-mvc] Re: Add/SubViewHelper

Nils Blattner nb at cabag.ch
Fri Feb 19 10:17:41 CET 2010


Nothing fancy, but I used them in the pager template so I will provide 
them here aswell:

SubViewHelper is exactly the same, but of course - instead of +, so I'm 
not gonna bother to paste :)

<?php

/*                                                                        *
  * This script is part of the TYPO3 project - inspiring people to share!  *
  *                                                                        *
  * TYPO3 is free software; you can redistribute it and/or modify it under *
  * the terms of the GNU General Public License version 2 as published by  *
  * the Free Software Foundation.                                          *
  *                                                                        *
  * This script is distributed in the hope that it will be useful, but     *
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  * 
    */


/**
  * Helper to do your dirty work (math).
  *
  * @version $Id:$
  * @license http://opensource.org/licenses/gpl-license.php GNU Public 
License, version 2
  * @scope prototype
  */
class Tx_CabagSteps_ViewHelpers_AddViewHelper extends 
Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
	/**
	 * Renders the Math
	 *
	 * @param int $arg1 Argument1 to be used
	 * @param int $arg2 Argument2 to be used
	 * @return int Calculated math
	 * @author Nils Blattner <nb at cabag.ch>
	 */
	public function render($arg1 = 0, $arg2 = 0) {
		return $arg1 + $arg2;
	}
}


?>


More information about the TYPO3-project-typo3v4mvc mailing list