TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory Class Reference
Inheritance diagram for TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory:
TYPO3\CMS\Core\SingletonInterface tx_form_Domain_Factory_Typoscript

Public Member Functions

 buildModelFromTyposcript (array $typoscript)
 
 setDisableContentElement ($disableContentElement)
 
 getChildElementsByIntegerKey (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $parentElement, array $typoscript)
 
 addElement (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $parentElement, $class, array $arguments=array())
 
 setAttributes (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $element, array $arguments)
 
 setAdditionals (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $element, array $arguments)
 
 getLayoutFromTypoScript ($typoscript)
 

Public Attributes

const PROPERTY_DisableContentElement = 'disableContentElement'
 

Protected Member Functions

 reconstituteElement (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $element, array $arguments=array())
 
 setFilters (\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $element, array $arguments)
 
 getLocalConentObject ()
 

Protected Attributes

 $localContentObject
 
 $disableContentElement = 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! Typoscript factory for form

Takes the incoming Typoscipt and adds all the necessary form objects according to the configuration.

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

Definition at line 25 of file TypoScriptFactory.php.

Member Function Documentation

◆ addElement()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::addElement ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $parentElement,
  $class,
array  $arguments = array() 
)

◆ buildModelFromTyposcript()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::buildModelFromTyposcript ( array  $typoscript)

Build model from Typoscript

Parameters
array$typoscriptTyposcript containing all configuration
Returns
The form object containing the child elements

Definition at line 48 of file TypoScriptFactory.php.

References TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\setDisableContentElement().

◆ getChildElementsByIntegerKey()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::getChildElementsByIntegerKey ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $parentElement,
array  $typoscript 
)

Rendering of a "numerical array" of Form objects from TypoScript Creates new object for each element found

Parameters
\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement$parentElementParent model object
array$typoscriptConfiguration array
Returns
void
Exceptions

Definition at line 76 of file TypoScriptFactory.php.

References $GLOBALS, TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\addElement(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\TypoScript\TemplateService\sortedKeyList().

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\reconstituteElement().

◆ getLayoutFromTypoScript()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::getLayoutFromTypoScript (   $typoscript)

Gets the layout that is configured in TypoScript If no layout is defined, it returns an empty array to use the default.

Parameters
array$typoscriptThe TypoScript configuration
Returns
array $layout The layout but with respecting its TypoScript configuration

Definition at line 321 of file TypoScriptFactory.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\TypoScript\TemplateService\sortedKeyList().

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\setFilters().

◆ getLocalConentObject()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::getLocalConentObject ( )
protected

◆ reconstituteElement()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::reconstituteElement ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $element,
array  $arguments = array() 
)
protected

◆ setAdditionals()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::setAdditionals ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $element,
array  $arguments 
)

Set the additionals from Element Typoscript configuration

Parameters
\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement$elementModel object
array$argumentsArguments
Returns
void
Exceptions

Definition at line 249 of file TypoScriptFactory.php.

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\reconstituteElement().

◆ setAttributes()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::setAttributes ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $element,
array  $arguments 
)

Set the attributes

Parameters
\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement$elementModel object
array$argumentsArguments
Returns
void
Exceptions

Definition at line 217 of file TypoScriptFactory.php.

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\reconstituteElement().

◆ setDisableContentElement()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::setDisableContentElement (   $disableContentElement)

Disables the content element.

Parameters
boolean$disableContentElement
Returns
void

Definition at line 63 of file TypoScriptFactory.php.

References TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\$disableContentElement.

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\buildModelFromTyposcript().

◆ setFilters()

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::setFilters ( \TYPO3\CMS\Form\Domain\Model\Element\AbstractElement  $element,
array  $arguments 
)
protected

Add the filters according to the settings in the Typoscript array

Parameters
\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement$elementModel object
array$argumentsTypoScript
Returns
void

Definition at line 289 of file TypoScriptFactory.php.

References TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\getLayoutFromTypoScript(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\TypoScript\TemplateService\sortedKeyList().

Referenced by TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory\reconstituteElement().

Member Data Documentation

◆ $disableContentElement

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::$disableContentElement = FALSE
protected

◆ $localContentObject

TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::$localContentObject
protected

◆ PROPERTY_DisableContentElement

const TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::PROPERTY_DisableContentElement = 'disableContentElement'