39 $GLOBALS[
'LANG']->includeLLFile(
'EXT:t3editor/locallang.xlf');
54 $this->
loadFile(\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(
't3editor') .
'res/tsref/tsref.xml');
55 $ajaxIdParts = explode(
'::', $ajaxObj->getAjaxID(), 2);
56 $ajaxMethod = $ajaxIdParts[1];
59 if ($ajaxMethod ==
'getTypes') {
60 $ajaxObj->setContent($this->
getTypes());
61 $ajaxObj->setContentFormat(
'jsonbody');
62 } elseif ($ajaxMethod ==
'getDescription') {
63 $ajaxObj->addContent(
'', $this->
getDescription(\
TYPO3\CMS\Core\Utility\GeneralUtility::_GP(
'typeId'), \
TYPO3\CMS\Core\Utility\GeneralUtility::_GP(
'parameterName')));
64 $ajaxObj->setContentFormat(
'plain');
76 $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE);
77 $this->xmlDoc = new \DOMDocument(
'1.0',
'utf-8');
78 $this->xmlDoc->loadXML(file_get_contents($filepath));
79 libxml_disable_entity_loader($previousValueOfEntityLoader);
81 $this->xmlDoc->saveXML();
90 $types = $this->xmlDoc->getElementsByTagName(
'type');
92 foreach ($types as $type) {
93 $typeId = $type->getAttribute(
'id');
94 $typeName = $type->getAttribute(
'name');
98 $properties = $type->getElementsByTagName(
'property');
100 foreach ($properties as $property) {
102 $p[
'name'] = $property->getAttribute(
'name');
103 $p[
'type'] = $property->getAttribute(
'type');
104 $propArr[$property->getAttribute(
'name')] = $p;
106 $typeArr[$typeId] = array();
107 $typeArr[$typeId][
'properties'] = $propArr;
108 $typeArr[$typeId][
'name'] = $typeName;
109 if ($type->hasAttribute(
'extends')) {
110 $typeArr[$typeId][
'extends'] = $type->getAttribute(
'extends');
125 $this->ajaxObj->setError(
$GLOBALS[
'LANG']->getLL(
'typeIDMissing'));
129 $type = $this->
getType($typeId);
131 if ($parameterName) {
132 $properties = $type->getElementsByTagName(
'property');
133 foreach ($properties as $propery) {
134 $propName = $propery->getAttribute(
'name');
135 if ($propName == $parameterName) {
136 $descriptions = $propery->getElementsByTagName(
'description');
137 if ($descriptions->length) {
138 $description = $descriptions->item(0)->textContent;
139 $description = htmlspecialchars($description);
140 $description = nl2br($description);
156 $types = $this->xmlDoc->getElementsByTagName(
'type');
157 foreach ($types as $type) {
158 if ($type->getAttribute(
'id') == $typeId) {
getDescription($typeId, $parameterName='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
processAjaxRequest($params, \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj)