/** * Render * * @param \TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $configuration * @return string the rendered tag */ public function render(\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $configuration) { $input = ''; if (isset($this->viewHelperMapping[$configuration->getType()]) && method_exists($this, $this->viewHelperMapping[$configuration->getType()])) { $input = $this->{$this->viewHelperMapping[$configuration->getType()]}($configuration); } return $input; }
/** * Render field of type "text" * * @param \TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $configuration * @return string */ protected function renderTextField(\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $configuration) { if ($configuration->getType() !== 'string') { \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The type "' . $configuration->getType() . '" is deprecated and will be removed with TYPO3 6.1'); } $this->tag->setTagName('input'); $this->tag->addAttribute('type', 'text'); $this->tag->addAttribute('name', $this->getName($configuration)); $this->tag->addAttribute('id', $configuration->getName()); if ($configuration->getValue() !== NULL) { $this->tag->addAttribute('value', $configuration->getValue()); } return $this->tag->render(); }