[TYPO3-mvc] Extend CropViewhelper

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Mon Oct 10 19:10:24 CEST 2011


Hi Thomas

Np, you're welcome =] I had a look at your code and now I'm curious about how you use 
the content getter and setter functions. If you want to allow both child and parameter 
values, there's an easier way:

  public function render( $value = NULL )
  {
    if ( NULL === $value ) {
      $value = $this->renderChildren();
    }
...

Can be used both as <gst:test value="foo" /> and <gst:test>foo</gst:test>
Or you can register the argument previously and then check if the arguments is set.

Cheers Tim

GSTALTIG GMBH / www.gstaltig.ch
Sonnenhofstr. 13 / 6020 Emmenbrücke
tim at gstaltig.ch / 076 488 24 97



More information about the TYPO3-project-typo3v4mvc mailing list