File modules/cms/action/element/ElementAdvancedAction.class.php
Last commit: Sat Jun 25 14:26:33 2022 +0200 Jan Dankert New: Many Enhancements for the internal script language: More access to the data structure of pages, folders, templates, ...
1 <?php 2 namespace cms\action\element; 3 use cms\action\Action; 4 use cms\action\ElementAction; 5 use cms\action\Method; 6 use cms\action\RequestParams; 7 use cms\base\Configuration; 8 use cms\generator\ValueGenerator; 9 use cms\model\BaseObject; 10 use cms\model\Element; 11 use cms\model\Folder; 12 use cms\model\Project; 13 use cms\model\Template; 14 use language\Messages; 15 use ReflectionClass; 16 use ReflectionProperty; 17 use util\FileUtils; 18 use util\Text; 19 20 21 class ElementAdvancedAction extends ElementAction implements Method { 22 23 const PROP_INHERIT = 'inherit'; 24 const PROP_WITHICON = 'withIcon'; 25 const PROP_ALL_LANGUAGES = 'allLanguages'; 26 const PROP_WRITABLE = 'writable'; 27 const PROP_HTML = 'html'; 28 const PROP_DEFAULT_TEXT = 'defaultText'; 29 const PROP_FORMAT = 'format'; 30 const PROP_LINKTYPE = 'linktype'; 31 const PROP_FOLDER_OBJECTID ='folderObjectId'; 32 const PROP_DEFAULT_OBJECTID ='defaultObjectId'; 33 const PROP_SUBTYPE = 'subtype'; 34 const PROP_DECPOINT = 'decPoint'; 35 const PROP_DECIMALS = 'decimals'; 36 const PROP_THOUSANDSEP = 'thousandSep'; 37 const PROP_CODE = 'code'; 38 const PROP_DATEFORMAT = 'dateformat'; 39 const PROP_PREFIX = 'prefix'; 40 const PROP_NAME = 'name'; 41 42 public function view() { 43 44 $this->setTemplateVar('type',$this->element->getTypeName() ); 45 46 // Abhaengig vom aktuellen Element-Typ die Eigenschaften anzeigen 47 foreach( $this->getRelatedProperties() as $propertyName ) 48 { 49 switch( $propertyName ) 50 { 51 case self::PROP_WITHICON: 52 $this->setTemplateVar('with_icon' ,$this->element->withIcon ); 53 break; 54 55 case self::PROP_ALL_LANGUAGES: 56 $this->setTemplateVar('all_languages',$this->element->allLanguages); 57 break; 58 59 case self::PROP_WRITABLE: 60 $this->setTemplateVar('writable' ,$this->element->writable ); 61 break; 62 63 case self::PROP_INHERIT: 64 $this->setTemplateVar('inherit' ,$this->element->inherit ); 65 break; 66 67 case self::PROP_HTML: 68 $this->setTemplateVar('html' ,$this->element->html ); 69 break; 70 71 case self::PROP_SUBTYPE: 72 73 $convertToLang = false; 74 switch( $this->element->typeid ) 75 { 76 case Element::ELEMENT_TYPE_INFO: 77 $subtypes = [ 78 ValueGenerator::INFO_DB_ID, 79 ValueGenerator::INFO_DB_NAME, 80 ValueGenerator::INFO_PROJECT_ID, 81 ValueGenerator::INFO_PROJECT_NAME, 82 ValueGenerator::INFO_LANGUAGE_ID, 83 ValueGenerator::INFO_LANGUAGE_ISO, 84 ValueGenerator::INFO_LANGUAGE_NAME, 85 ValueGenerator::INFO_PAGE_ID, 86 ValueGenerator::INFO_PAGE_NAME, 87 ValueGenerator::INFO_PAGE_DESC, 88 ValueGenerator::INFO_PAGE_FULLFILENAME, 89 ValueGenerator::INFO_PAGE_FILENAME, 90 ValueGenerator::INFO_PAGE_EXTENSION, 91 ValueGenerator::INFO_EDIT_URL, 92 ValueGenerator::INFO_EDIT_FULLURL, 93 ValueGenerator::INFO_LASTCHANGE_USER_USERNAME, 94 ValueGenerator::INFO_LASTCHANGE_USER_FULLNAME, 95 ValueGenerator::INFO_LASTCHANGE_USER_MAIL, 96 ValueGenerator::INFO_LASTCHANGE_USER_DESC, 97 ValueGenerator::INFO_LASTCHANGE_USER_TEL, 98 ValueGenerator::INFO_CREATION_USER_USERNAME, 99 ValueGenerator::INFO_CREATION_FULLNAME, 100 ValueGenerator::INFO_CREATION_MAIL, 101 ValueGenerator::INFO_CREATION_DESC, 102 ValueGenerator::INFO_CREATION_TEL, 103 ValueGenerator::INFO_ACT_USERNAME, 104 ValueGenerator::INFO_ACT_FULLNAME, 105 ValueGenerator::INFO_ACT_MAIL, 106 ValueGenerator::INFO_ACT_DESC, 107 ValueGenerator::INFO_ACT_TEL, 108 ValueGenerator::INFO_PUB_USERNAME, 109 ValueGenerator::INFO_PUB_FULLNAME, 110 ValueGenerator::INFO_PUB_MAIL, 111 ValueGenerator::INFO_PUB_DESC, 112 ValueGenerator::INFO_PUB_TEL 113 ]; 114 $convertToLang = true; 115 break; 116 117 case Element::ELEMENT_TYPE_INFODATE: 118 case Element::ELEMENT_TYPE_LINKDATE: 119 $subtypes = [ 120 ValueGenerator::INFO_DATE_PUBLISHED, 121 ValueGenerator::INFO_DATE_SAVED, 122 ValueGenerator::INFO_DATE_CREATED, 123 ]; 124 $convertToLang = true; 125 break; 126 127 case Element::ELEMENT_TYPE_LINK: 128 $subtypes = [ 129 ValueGenerator::LINK_FILE_, 130 ValueGenerator::LINK_IMAGE, 131 ValueGenerator::LINK_IMAGE_DATE_URI, 132 ValueGenerator::LINK_PAGE, 133 ValueGenerator::LINK_FOLDER, 134 ValueGenerator::LINK_LINK 135 ]; 136 $convertToLang = true; 137 break; 138 139 case Element::ELEMENT_TYPE_CODE: 140 141 $subtypes = [ 142 ValueGenerator::CODE_PHP, 143 ValueGenerator::CODE_SCRIPT, 144 ValueGenerator::CODE_MUSTACHE, 145 ]; 146 $convertToLang = true; 147 break; 148 149 case Element::ELEMENT_TYPE_LINKINFO: 150 $subtypes = [ 151 ValueGenerator::LINKINFO_WIDTH, 152 ValueGenerator::LINKINFO_HEIGHT, 153 ValueGenerator::LINKINFO_ID, 154 ValueGenerator::LINKINFO_NAME, 155 ValueGenerator::LINKINFO_DESCRIPTION, 156 ValueGenerator::LINKINFO_MIME_TYPE, 157 ValueGenerator::INFO_LASTCHANGE_USER_USERNAME, 158 ValueGenerator::INFO_LASTCHANGE_USER_FULLNAME, 159 ValueGenerator::INFO_LASTCHANGE_USER_MAIL, 160 ValueGenerator::INFO_LASTCHANGE_USER_DESC, 161 ValueGenerator::INFO_LASTCHANGE_USER_TEL, 162 ValueGenerator::INFO_CREATION_USER_USERNAME, 163 ValueGenerator::INFO_CREATION_FULLNAME, 164 ValueGenerator::INFO_CREATION_MAIL, 165 ValueGenerator::INFO_CREATION_DESC, 166 ValueGenerator::INFO_CREATION_TEL, 167 ValueGenerator::INFO_PUB_USERNAME, 168 ValueGenerator::INFO_PUB_FULLNAME, 169 ValueGenerator::INFO_PUB_MAIL, 170 ValueGenerator::INFO_PUB_DESC, 171 ValueGenerator::INFO_PUB_TEL, 172 ValueGenerator::INFO_FILENAME, 173 ValueGenerator::INFO_FULL_FILENAME 174 ]; 175 $convertToLang = true; 176 break; 177 178 case Element::ELEMENT_TYPE_INSERT: 179 $subtypes = [ 180 ValueGenerator::INSERT_INLINE, 181 ValueGenerator::INSERT_SSI, 182 ValueGenerator::INSERT_ESI, 183 ]; 184 $convertToLang = true; 185 break; 186 187 case Element::ELEMENT_TYPE_DATA: 188 break; 189 190 case Element::ELEMENT_TYPE_COORD: 191 $subtypes = [ 192 ValueGenerator::COORD_OLC, 193 ValueGenerator::COORD_COORDINATES, 194 ]; 195 $convertToLang = true; 196 break; 197 198 case Element::ELEMENT_TYPE_DYNAMIC: 199 200 $files = Array(); 201 $macroFiles = FileUtils::readDir(__DIR__ . '/../../../cms/macros/macro'); 202 foreach( $macroFiles as $macroFile ) 203 { 204 $file = substr($macroFile,0,strlen($macroFile)-10); 205 if ( $file != '' ) 206 $files[$file] = $file; 207 } 208 209 $subtypes = $files; 210 break; 211 212 default: 213 $subtypes = array(); 214 break; 215 } 216 217 if ( $convertToLang ) 218 { 219 foreach( $subtypes as $t=>$v ) 220 { 221 unset($subtypes[$t]); 222 $subtypes[$v] = \cms\base\Language::lang('EL_'.$this->element->getTypeName().'_'.$v); 223 } 224 } 225 226 // Variable $subtype muss existieren, um Anzeige des Feldes zu erzwingen. 227 if (!isset($this->element->subtype)) 228 $this->element->subtype=''; 229 230 $this->setTemplateVar('subtypes',$subtypes ); 231 $this->setTemplateVar('subtype' ,$this->element->subtype); 232 233 break; 234 235 236 case self::PROP_DATEFORMAT: 237 238 $ini_date_format = Configuration::subset('date')->get('format',[]); 239 $dateformat = array(); 240 241 $this->setTemplateVar('dateformat',''); 242 243 foreach($ini_date_format as $idx=>$d) 244 { 245 if ( strpos($d,'%')!==FALSE ) 246 $dateformat[$idx] = strftime($d); 247 else 248 $dateformat[$idx] = date($d); 249 if ( $d == $this->element->dateformat ) 250 $this->setTemplateVar('dateformat',$idx); 251 } 252 253 $this->setTemplateVar('dateformats',$dateformat); 254 255 break; 256 257 258 // Eigenschaften Text und Text-Absatz 259 case self::PROP_DEFAULT_TEXT: 260 261 switch( $this->element->typeid ) 262 { 263 case Element::ELEMENT_TYPE_LONGTEXT: 264 $this->setTemplateVar('default_longtext',$this->element->defaultText ); 265 break; 266 267 case Element::ELEMENT_TYPE_SELECT: 268 case Element::ELEMENT_TYPE_TEXT: 269 $this->setTemplateVar('default_text' ,$this->element->defaultText ); 270 break; 271 } 272 break; 273 274 275 case self::PROP_FORMAT: 276 $this->setTemplateVar('format', $this->element->format ); 277 278 $formats = Element::getAvailableFormats(); 279 280 // Für einfache Textelemente gibt es keinen HTML-Editor 281 if ( $this->element->typeid != Element::ELEMENT_TYPE_LONGTEXT ) 282 unset( $formats[ Element::ELEMENT_FORMAT_HTML ] ); 283 284 //foreach( $formats as $t=>$v ) 285 // $formats[$t] = array('lang'=>'EL_PROP_FORMAT_'.$v); 286 287 $this->setTemplateVar('formatlist', $formats); 288 break; 289 290 case self::PROP_LINKTYPE: 291 $this->setTemplateVar('linktype', $this->element->wiki ); 292 $this->setTemplateVar('linktypelist', array('page','file','link') ); 293 break; 294 295 case self::PROP_PREFIX: 296 $t = new Template( $this->element->templateid ); 297 298 $elements = array(); 299 foreach( $t->getElements() as $element ) 300 { 301 if ( $element->type == 'link' ) 302 $elements[$element->name] = $element->name; 303 } 304 unset($t); 305 306 $this->setTemplateVar('linkelements',$elements ); 307 308 list($linkElementName,$targetElementName) = explode('%',$this->element->name.'%'); 309 $this->setTemplateVar('linkelement',$linkElementName ); 310 311 break; 312 313 case self::PROP_NAME: 314 315 $names = array(); 316 317 $template = new Template( $this->element->templateid ); 318 $template->load(); 319 $project = new Project( $template->projectid ); 320 321 foreach( $project->getTemplates() as $tid=>$name ) 322 { 323 $t = new Template( $tid ); 324 $t->load(); 325 326 foreach( $t->getElements() as $element ) 327 { 328 if ( !in_array($element->type,array('copy','linkinfo','link')) ) 329 $names[$element->name] = $t->name.' - '.$element->name.' ('.\cms\base\Language::lang('EL_'.$element->type).')'; 330 } 331 unset($t); 332 } 333 334 335 $this->setTemplateVar('names',$names ); 336 337 list($linkElementName,$targetElementName) = explode('%',$this->element->name.'%'); 338 $this->setTemplateVar('name',$targetElementName ); 339 break; 340 341 // Eigenschaften PHP-Code 342 case self::PROP_CODE: 343 344 switch( $this->element->typeid ) 345 { 346 347 case Element::ELEMENT_TYPE_SELECT: 348 $this->setTemplateVar('select_items',$this->element->code ); 349 break; 350 351 case Element::ELEMENT_TYPE_DYNAMIC: 352 353 $className = '\\cms\\macros\\macro\\'.ucfirst($this->element->subtype); 354 355 $description = ''; 356 $paramList = array(); 357 $parameters = array(); 358 359 if ( class_exists($className) ) 360 { 361 $dynEl = new $className; 362 363 $description = $dynEl->description; 364 365 $old = $this->element->getDynamicParameters(); 366 367 $reflect = new ReflectionClass($dynEl); 368 $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED); 369 foreach( get_object_vars($dynEl) as $paramName=>$paramValue ) 370 { 371 $paramList[$paramName] = print_r( $paramValue, true); 372 373 if ( @$old[$paramName] ) 374 $parameters[$paramName] = $old[$paramName]; 375 else 376 $parameters[$paramName] = $paramValue; 377 } 378 379 } 380 381 $this->setTemplateVar('dynamic_class_description',$description ); 382 $this->setTemplateVar('dynamic_class_parameters' ,$paramList ); 383 $this->setTemplateVar('parameters' , \util\YAML::dump($parameters) ); 384 385 386 break; 387 388 case Element::ELEMENT_TYPE_CODE: 389 if ( Configuration::subset('security')->is('disable_dynamic_code',true ) ) 390 $this->addWarningFor( $this->element, Messages::CODE_DISABLED); 391 392 $this->setTemplateVar('code',$this->element->code); 393 break; 394 395 default: 396 $this->setTemplateVar('code',$this->element->code); 397 } 398 break; 399 400 401 case self::PROP_DECIMALS: 402 $this->setTemplateVar('decimals' ,$this->element->decimals ); 403 break; 404 405 case self::PROP_DECPOINT: 406 $this->setTemplateVar('dec_point' ,$this->element->decPoint ); 407 break; 408 409 case self::PROP_THOUSANDSEP: 410 $this->setTemplateVar('thousand_sep' ,$this->element->thousandSep ); 411 break; 412 413 414 // Eigenschaften Link 415 case self::PROP_DEFAULT_OBJECTID: 416 417 $objects = array(); 418 419 $template = new Template( $this->element->templateid ); 420 $template->load(); 421 $project = new Project( $template->projectid ); 422 423 // Ermitteln aller verfuegbaren Objekt-IDs 424 foreach( $project->getAllObjectIds() as $id ) 425 { 426 $o = new BaseObject( $id ); 427 $o->load(); 428 429 switch( $this->element->typeid ) 430 { 431 case Element::ELEMENT_TYPE_LINK: 432 if ( ! in_array( $o->typeid, array(BaseObject::TYPEID_PAGE,BaseObject::TYPEID_IMAGE,BaseObject::TYPEID_FILE,BaseObject::TYPEID_LINK,BaseObject::TYPEID_URL,BaseObject::TYPEID_TEXT ) ) ) 433 continue 2; 434 break; 435 //Change tobias 436 case Element::ELEMENT_TYPE_INSERT: 437 if ( ! in_array( $o->typeid, array(BaseObject::TYPEID_FOLDER,BaseObject::TYPEID_PAGE,BaseObject::TYPEID_IMAGE,BaseObject::TYPEID_FILE,BaseObject::TYPEID_LINK,BaseObject::TYPEID_URL,BaseObject::TYPEID_TEXT ) ) ) 438 continue 2; 439 break; 440 //Change tobias end 441 default: 442 continue 2; 443 } 444 445 $objects[ $id ] = \cms\base\Language::lang( $o->getType() ).': '; 446 447 if ( !$o->isRoot() ) 448 { 449 $f = new Folder( $o->parentid ); 450 $f->load(); 451 $names = $f->parentObjectNames(false,true); 452 foreach( $names as $fid=>$name ) 453 $names[$fid] = Text::maxLength($name,15,'..',STR_PAD_BOTH); 454 $objects[ $id ] .= implode( \util\Text::FILE_SEP,$names ); 455 } 456 457 $objects[ $id ] .= \util\Text::FILE_SEP.$o->getName(); 458 } 459 460 asort( $objects ); // Sortieren 461 462 $this->setTemplateVar('objects',$objects); 463 464 $this->setTemplateVar('default_objectid',$this->element->defaultObjectId); 465 466 break; 467 468 469 case self::PROP_FOLDER_OBJECTID: 470 471 472 // Ermitteln aller verf?gbaren Objekt-IDs 473 $template = new Template( $this->element->templateid ); 474 $template->load(); 475 $project = new Project( $template->projectid ); 476 477 $folders = $project->getAllFlatFolders(); 478 $this->setTemplateVar('folders',$folders); 479 480 $this->setTemplateVar('folderobjectid' ,$this->element->folderObjectId ); 481 482 break; 483 484 default: 485 throw new \LogicException('Unknown element property: '.$propertyName ); 486 } 487 } 488 } 489 490 491 public function post() { 492 493 $this->request->handleNumber('format',function($value) { 494 $this->element->format = $value; 495 }); 496 497 498 $this->request->handleText('dateformat',function($value) { 499 $this->element->dateformat = @Configuration::subset('date')->get('format',[] )[$value]; 500 }); 501 502 503 $this->request->handleText('default_longtext',function($value) { 504 $this->element->defaultText = $value; 505 }); 506 $this->request->handleText('default_text',function($value) { 507 $this->element->defaultText = $value; 508 }); 509 510 $this->request->handleText('subtype',function($value) { 511 $this->element->subtype = $value; 512 }); 513 514 $this->request->handleBool('html',function($value) { 515 $this->element->html = $value; 516 }); 517 $this->request->handleBool('with_icon',function($value) { 518 $this->element->withIcon = $value; 519 }); 520 $this->request->handleBool('all_languages',function($value) { 521 $this->element->allLanguages = $value; 522 }); 523 $this->request->handleBool('writable',function($value) { 524 $this->element->writable = $value; 525 }); 526 $this->request->handleBool('inherit',function($value) { 527 $this->element->inherit = $value; 528 }); 529 530 $this->request->handleText('decimals',function($value) { 531 $this->element->decimals = $value; 532 }); 533 $this->request->handleText('dec_point',function($value) { 534 $this->element->decPoint = $value; 535 }); 536 $this->request->handleText('thousand_sep',function($value) { 537 $this->element->thousandSep = $value; 538 }); 539 $this->request->handleText('folderobjectid',function($value) { 540 $this->element->folderObjectId = $value; 541 }); 542 $this->request->handleText('default_objectid',function($value) { 543 $this->element->defaultObjectId = $value; 544 }); 545 546 547 $this->request->handleText('select_items',function($value) { 548 $this->element->code = $value; 549 }); 550 $this->request->handleText('code',function($value) { 551 $this->element->code = $value; 552 }); 553 554 $this->request->handleText('name',function($value) { 555 $this->element->name = $value; 556 }); 557 $this->request->handleText('linkelement',function($value) { 558 $this->element->setPrefix( $value ); 559 }); 560 $this->request->handleText('parameters',function($value) { 561 $this->element->code = $value; 562 }); 563 564 $this->element->save(); 565 $this->addNoticeFor( $this->element, Messages::SAVED); 566 567 } 568 569 570 571 /** 572 * Abhaengig vom Element-Typ werden die zur Darstellung notwendigen Eigenschaften ermittelt. 573 * @return string[] 574 */ 575 protected function getRelatedProperties() 576 { 577 $relatedProperties = [ 578 Element::ELEMENT_TYPE_TEXT => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_HTML,self::PROP_DEFAULT_TEXT,self::PROP_FORMAT,self::PROP_CODE], 579 Element::ELEMENT_TYPE_LONGTEXT => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_HTML,self::PROP_DEFAULT_TEXT,self::PROP_FORMAT,self::PROP_CODE], 580 Element::ELEMENT_TYPE_SELECT => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_DEFAULT_TEXT,self::PROP_CODE], 581 Element::ELEMENT_TYPE_NUMBER => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_DECPOINT,self::PROP_DECIMALS,self::PROP_THOUSANDSEP,self::PROP_CODE], 582 Element::ELEMENT_TYPE_CHECKBOX => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_CODE], 583 Element::ELEMENT_TYPE_LINK => [self::PROP_INHERIT,self::PROP_SUBTYPE,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_LINKTYPE,self::PROP_FOLDER_OBJECTID,self::PROP_DEFAULT_OBJECTID,self::PROP_CODE], 584 Element::ELEMENT_TYPE_DATE => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_DATEFORMAT,self::PROP_DEFAULT_TEXT,self::PROP_CODE], 585 Element::ELEMENT_TYPE_INSERT => [self::PROP_INHERIT,self::PROP_SUBTYPE,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_FOLDER_OBJECTID,self::PROP_DEFAULT_OBJECTID], 586 Element::ELEMENT_TYPE_COPY => [self::PROP_INHERIT,self::PROP_PREFIX,self::PROP_NAME,self::PROP_DEFAULT_TEXT], 587 Element::ELEMENT_TYPE_LINKINFO => [self::PROP_PREFIX,self::PROP_SUBTYPE,self::PROP_DEFAULT_TEXT,self::PROP_CODE], 588 Element::ELEMENT_TYPE_LINKDATE => [self::PROP_PREFIX,self::PROP_SUBTYPE,self::PROP_DATEFORMAT,self::PROP_CODE], 589 Element::ELEMENT_TYPE_CODE => [self::PROP_SUBTYPE,self::PROP_CODE], 590 Element::ELEMENT_TYPE_DYNAMIC => [self::PROP_SUBTYPE,self::PROP_CODE], 591 Element::ELEMENT_TYPE_INFO => [self::PROP_SUBTYPE], 592 Element::ELEMENT_TYPE_INFODATE => [self::PROP_SUBTYPE,self::PROP_DATEFORMAT,self::PROP_CODE], 593 Element::ELEMENT_TYPE_DATA => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_CODE], 594 Element::ELEMENT_TYPE_COORD => [self::PROP_INHERIT,self::PROP_WITHICON,self::PROP_ALL_LANGUAGES,self::PROP_WRITABLE,self::PROP_SUBTYPE,self::PROP_CODE], 595 ]; 596 597 return $relatedProperties[ $this->element->typeid ]; 598 } 599 600 }
Downloadmodules/cms/action/element/ElementAdvancedAction.class.php
History Sat, 25 Jun 2022 14:26:33 +0200 Jan Dankert New: Many Enhancements for the internal script language: More access to the data structure of pages, folders, templates, ... Tue, 14 Jun 2022 01:11:09 +0200 Jan Dankert New: Support for ESI templates; some bugfixes while generating the 'insert' element type. Thu, 2 Jun 2022 01:04:54 +0200 Jan Dankert New: Element type "checkbox" Wed, 1 Jun 2022 01:05:34 +0200 Jan Dankert New: Element types for "coordinates" and "data" Wed, 1 Jun 2022 00:11:40 +0200 Jan Dankert New: DSL as a filter for number values Wed, 25 May 2022 22:47:17 +0200 Jan Dankert New: DSL (domain specific language) for code elements. The old way with PHP code ist not sandboxed and unsecure. This approach is a minimalistic, javascript-like, scripting engine. For now only simple function calls are possible, for example: alert("example"); Wed, 9 Mar 2022 13:28:52 +0100 dankert Refactoring: Checkbox values are always sent to the server. In the actions we must test the value with 'isTrue()' Sun, 5 Dec 2021 20:33:24 +0100 dankert Cleanup: Removed unusable properties from class 'Value' and 'BaseObject'. Wed, 10 Mar 2021 23:51:22 +0100 Jan Dankert Refactoring: Cleaned the Request params. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Thu, 19 Nov 2020 14:49:58 +0100 Jan Dankert Fix: Action::addNotice() is replaced by Action::addNoticeFor() Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.