TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView Class Reference
Inheritance diagram for TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView:
tx_form_View_Mail_Html_Element_Abstract TYPO3\CMS\Form\View\Mail\Html\Additional\AdditionalElementView TYPO3\CMS\Form\View\Mail\Html\Element\CheckboxElementView TYPO3\CMS\Form\View\Mail\Html\Element\ContainerElementView TYPO3\CMS\Form\View\Mail\Html\Element\FileuploadElementView TYPO3\CMS\Form\View\Mail\Html\Element\HiddenElementView TYPO3\CMS\Form\View\Mail\Html\Element\OptionElementView TYPO3\CMS\Form\View\Mail\Html\Element\RadioElementView TYPO3\CMS\Form\View\Mail\Html\Element\TextareaElementView TYPO3\CMS\Form\View\Mail\Html\Element\TextlineElementView

Public Member Functions

 __construct ($model)
 
 render ($type='element', $returnFirstChild=TRUE)
 
 replaceNodeWithFragment (\DOMDocument $dom, \DOMNode $node, \DOMNode $value)
 
 setAttributes (\DOMElement $domElement)
 
 setAttribute (\DOMElement $domElement, $key)
 
 setAttributeWithValueofOtherAttribute (\DOMElement $domElement, $key, $other)
 
 getAdditional ($key)
 
 getInputValue ()
 
 getElementWrapId ()
 
 getElementWrapType ()
 
 getElementWraps ()
 
 noWrap ()
 

Protected Member Functions

 parseXML (\DOMDocument $dom, \DOMNode $reference, $emptyElement=FALSE)
 
 createAdditional ($class)
 

Protected Attributes

 $model
 
 $elementWrap
 
 $noWrap = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Abstract class for the form elements view

Author
Patrick Broens patri.nosp@m.ck@p.nosp@m.atric.nosp@m.kbro.nosp@m.ens.n.nosp@m.l

Definition at line 22 of file AbstractElementView.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::__construct (   $model)

Constructor

Parameters
object$modelCurrent elements model

Definition at line 55 of file AbstractElementView.php.

References TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\$model.

Member Function Documentation

◆ createAdditional()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::createAdditional (   $class)
protected

Load and instantiate an additional object

Parameters
string$classType of additional
Returns
object

Definition at line 282 of file AbstractElementView.php.

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\getAdditional().

◆ getAdditional()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::getAdditional (   $key)

Create additional object by key and render the content

Parameters
string$keyType of additional
Returns

Definition at line 294 of file AbstractElementView.php.

References TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\createAdditional().

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\parseXML().

◆ getElementWrapId()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::getElementWrapId ( )

Return the id for the element wraps, like ...

Returns
string

Definition at line 320 of file AbstractElementView.php.

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\getElementWraps().

◆ getElementWraps()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::getElementWraps ( )

◆ getElementWrapType()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::getElementWrapType ( )

Returns the type for the element wraps, like ...

Returns
string

Definition at line 332 of file AbstractElementView.php.

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\getElementWraps().

◆ getInputValue()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::getInputValue ( )

◆ noWrap()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::noWrap ( )

Read the noWrap value of an element if TRUE the element does not need a element wrap like element

Returns
boolean

Definition at line 358 of file AbstractElementView.php.

References TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\$noWrap.

◆ parseXML()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::parseXML ( \DOMDocument  $dom,
\DOMNode  $reference,
  $emptyElement = FALSE 
)
protected

Parse the XML of a view object, check the node type and name and add the proper XML part of child tags to the of the current tag

Parameters
\DOMDocument$dom
\DOMNode$referenceCurrent XML structure
boolean$emptyElement
Returns
boolean

Definition at line 70 of file AbstractElementView.php.

References TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\getAdditional(), TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\getInputValue(), TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\render(), and TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\replaceNodeWithFragment().

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\render().

◆ render()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::render (   $type = 'element',
  $returnFirstChild = TRUE 
)

Get the content for the current object as

Parameters
string$typeType of element for layout
boolean$returnFirstChildIf TRUE, the first child will be returned instead of the
Returns
| XML part of the view object

Definition at line 165 of file AbstractElementView.php.

References TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\$elementWrap, TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\parseXML().

Referenced by TYPO3\CMS\Form\View\Mail\Html\HtmlView\get(), and TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\parseXML().

◆ replaceNodeWithFragment()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::replaceNodeWithFragment ( \DOMDocument  $dom,
\DOMNode  $node,
\DOMNode  $value 
)

Replace the current node with a document fragment

Parameters
\DOMDocument$dom
\DOMNode$nodeCurrent Node
\DOMNode$valueValue to import
Returns
void

Definition at line 220 of file AbstractElementView.php.

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\parseXML().

◆ setAttribute()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::setAttribute ( \DOMElement  $domElement,
  $key 
)

Set a single attribute of a HTML tag specified by key

Parameters
\DOMElement$domElementDOM element of the specific HTML tag
string$keyAttribute key
Returns
void

Definition at line 253 of file AbstractElementView.php.

◆ setAttributes()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::setAttributes ( \DOMElement  $domElement)

Set the attributes on the html tags according to the attributes that are assigned in the model for a certain element

Parameters
\DOMElement$domElementDOM element of the specific HTML tag
Returns
void

Definition at line 234 of file AbstractElementView.php.

◆ setAttributeWithValueofOtherAttribute()

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::setAttributeWithValueofOtherAttribute ( \DOMElement  $domElement,
  $key,
  $other 
)

Sets the value of an attribute with the value of another attribute, for instance equalizing the name and id attributes for the form tag

Parameters
\DOMElement$domElementDOM element of the specific HTML tag
string$keyKey of the attribute which needs to be changed
string$otherKey of the attribute to take the value from
Returns
void

Definition at line 269 of file AbstractElementView.php.

Member Data Documentation

◆ $elementWrap

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::$elementWrap
protected
Initial value:
= '
<tr>
<element />
</tr>
'

Definition at line 36 of file AbstractElementView.php.

Referenced by TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView\render().

◆ $model

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::$model
protected

◆ $noWrap

TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::$noWrap = FALSE
protected