TYPO3 CMS  TYPO3_6-2
FormJsonElement.php
Go to the documentation of this file.
1 <?php
3 
23 
29  public $xtype = 'typo3-form-wizard-elements-basic-form';
30 
36  public $configuration = array(
37  'attributes' => array(),
38  'prefix' => 'tx_form',
39  'confirmation' => TRUE,
40  'postProcessor' => array()
41  );
42 
48  protected $allowedAttributes = array(
49  'accept',
50  'accept-charset',
51  'action',
52  'class',
53  'dir',
54  'enctype',
55  'id',
56  'lang',
57  'method',
58  'style',
59  'title'
60  );
61 
69  public function setParameters(array $parameters) {
70  parent::setParameters($parameters);
71  $this->setPrefix($parameters);
72  $this->setConfirmation($parameters);
73  $this->setPostProcessors($parameters);
74  }
75 
82  protected function setConfirmation(array $parameters) {
83  if (isset($parameters['confirmation'])) {
84  $this->configuration['confirmation'] = $parameters['confirmation'];
85  }
86  }
87 
94  protected function setPostProcessors(array $parameters) {
95  if (isset($parameters['postProcessor.']) && is_array($parameters['postProcessor.'])) {
96  $postProcessors = $parameters['postProcessor.'];
97  foreach ($postProcessors as $key => $postProcessorName) {
98  if ((int)$key && strpos($key, '.') === FALSE) {
99  $postProcessorConfiguration = array();
100  if (isset($postProcessors[$key . '.'])) {
101  $postProcessorConfiguration = $postProcessors[$key . '.'];
102  }
103  $this->configuration['postProcessor'][$postProcessorName] = $postProcessorConfiguration;
104  }
105  }
106  } else {
107  $this->configuration['postProcessor'] = array(
108  'mail' => array(
109  'recipientEmail' => '',
110  'senderEmail' => ''
111  )
112  );
113  }
114  }
115 
122  protected function setPrefix(array $parameters) {
123  if (isset($parameters['prefix'])) {
124  $this->configuration['prefix'] = $parameters['prefix'];
125  }
126  }
127 
128 }
$parameters
Definition: FileDumpEID.php:15