Created by
This Mächler
last modified
| ------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
-- Example for an Extbase-Viewhelper
--
-- "NEM": Vendor Name
-- "NemTourdates": Extension Name
-- See "ext_localconf.php" ->
-- \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'NEM.' . $_EXTKEY, 'Tourdates', .. )
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-- PHP Class - File: nem_tourdates / Classes / ViewHelpers / DateViewHelper.php
-------------------------------------------------------------------------------------
<?php
namespace NEM\NemTourdates\ViewHelpers;
class DateViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
/**
* render
*
* returns a display value, computed from the data model
* @param \NEM\NemTourdates\Domain\Model\Date $date the date object
* @param string $key
* @param array $settings
* @return mixed
* @author This Mächler <maechler@mm-computing.ch>
*/
public function render(\NEM\NemTourdates\Domain\Model\Date $date, $key, $settings=NULL) {
.....
.....
return $result;
}
}
--------------------------------------------------
-- Fluid - Template
--------------------------------------------------
{namespace nem=NEM\NemTourdates\ViewHelpers}
...
...
{nem:date(date: date, key: 'date')}
|