openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit ae704ffc593ecfdd11834686937e89ee98a9a755
parent 51db1054f08329113358751e744a4978e335a58f
Author: Jan Dankert <develop@jandankert.de>
Date:   Wed, 14 Oct 2020 22:20:22 +0200

Refactoring: Renamed component folders, because 'if' is no valid namespace fragment.

Diffstat:
Rmodules/template_engine/components/html/button/ButtonComponent.class.php -> modules/template_engine/components/html/component_button/ButtonComponent.class.php | 0
Rmodules/template_engine/components/html/checkbox/CheckboxComponent.class.php -> modules/template_engine/components/html/component_checkbox/CheckboxComponent.class.php | 0
Rmodules/template_engine/components/html/column/ColumnComponent.class.php -> modules/template_engine/components/html/component_column/ColumnComponent.class.php | 0
Rmodules/template_engine/components/html/column/column.js -> modules/template_engine/components/html/component_column/column.js | 0
Rmodules/template_engine/components/html/date/DateComponent.class.php -> modules/template_engine/components/html/component_date/DateComponent.class.php | 0
Rmodules/template_engine/components/html/date/component-date.php -> modules/template_engine/components/html/component_date/component-date.php | 0
Rmodules/template_engine/components/html/editor/EditorComponent.class.php -> modules/template_engine/components/html/component_editor/EditorComponent.class.php | 0
Rmodules/template_engine/components/html/editor/editor.js -> modules/template_engine/components/html/component_editor/editor.js | 0
Rmodules/template_engine/components/html/editor/editor.less -> modules/template_engine/components/html/component_editor/editor.less | 0
Rmodules/template_engine/components/html/else/ElseComponent.class.php -> modules/template_engine/components/html/component_else/ElseComponent.class.php | 0
Rmodules/template_engine/components/html/form/FormComponent.class.php -> modules/template_engine/components/html/component_form/FormComponent.class.php | 0
Rmodules/template_engine/components/html/group/GroupComponent.class.php -> modules/template_engine/components/html/component_group/GroupComponent.class.php | 0
Rmodules/template_engine/components/html/group/group.js -> modules/template_engine/components/html/component_group/group.js | 0
Rmodules/template_engine/components/html/group/group.less -> modules/template_engine/components/html/component_group/group.less | 0
Rmodules/template_engine/components/html/hidden/HiddenComponent.class.php -> modules/template_engine/components/html/component_hidden/HiddenComponent.class.php | 0
Amodules/template_engine/components/html/component_if/IfComponent.class.php | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Rmodules/template_engine/components/html/image/ImageComponent.class.php -> modules/template_engine/components/html/component_image/ImageComponent.class.php | 0
Rmodules/template_engine/components/html/image/image.js -> modules/template_engine/components/html/component_image/image.js | 0
Rmodules/template_engine/components/html/image/image.less -> modules/template_engine/components/html/component_image/image.less | 0
Rmodules/template_engine/components/html/include/IncludeComponent.class.php -> modules/template_engine/components/html/component_include/IncludeComponent.class.php | 0
Rmodules/template_engine/components/html/input/InputComponent.class.php -> modules/template_engine/components/html/component_input/InputComponent.class.php | 0
Rmodules/template_engine/components/html/inputarea/InputareaComponent.class.php -> modules/template_engine/components/html/component_inputarea/InputareaComponent.class.php | 0
Rmodules/template_engine/components/html/insert/InsertComponent.class.php -> modules/template_engine/components/html/component_insert/InsertComponent.class.php | 0
Rmodules/template_engine/components/html/label/LabelComponent.class.php -> modules/template_engine/components/html/component_label/LabelComponent.class.php | 0
Rmodules/template_engine/components/html/link/LinkComponent.class.php -> modules/template_engine/components/html/component_link/LinkComponent.class.php | 0
Rmodules/template_engine/components/html/link/link.js -> modules/template_engine/components/html/component_link/link.js | 0
Rmodules/template_engine/components/html/list/ListComponent.class.php -> modules/template_engine/components/html/component_list/ListComponent.class.php | 0
Rmodules/template_engine/components/html/logo/LogoComponent.class.php -> modules/template_engine/components/html/component_logo/LogoComponent.class.php | 0
Rmodules/template_engine/components/html/newline/NewlineComponent.class.php -> modules/template_engine/components/html/component_newline/NewlineComponent.class.php | 0
Rmodules/template_engine/components/html/output/OutputComponent.class.php -> modules/template_engine/components/html/component_output/OutputComponent.class.php | 0
Rmodules/template_engine/components/html/part/PartComponent.class.php -> modules/template_engine/components/html/component_part/PartComponent.class.php | 0
Rmodules/template_engine/components/html/password/PasswordComponent.class.php -> modules/template_engine/components/html/component_password/PasswordComponent.class.php | 0
Rmodules/template_engine/components/html/qrcode/QrcodeComponent.class.php -> modules/template_engine/components/html/component_qrcode/QrcodeComponent.class.php | 0
Rmodules/template_engine/components/html/qrcode/qrcode.js -> modules/template_engine/components/html/component_qrcode/qrcode.js | 0
Rmodules/template_engine/components/html/radio/RadioComponent.class.php -> modules/template_engine/components/html/component_radio/RadioComponent.class.php | 0
Rmodules/template_engine/components/html/radiobox/RadioboxComponent.class.php -> modules/template_engine/components/html/component_radiobox/RadioboxComponent.class.php | 0
Rmodules/template_engine/components/html/row/RowComponent.class.php -> modules/template_engine/components/html/component_row/RowComponent.class.php | 0
Rmodules/template_engine/components/html/selectbox/SelectboxComponent.class.php -> modules/template_engine/components/html/component_selectbox/SelectboxComponent.class.php | 0
Rmodules/template_engine/components/html/selector/SelectorComponent.class.php -> modules/template_engine/components/html/component_selector/SelectorComponent.class.php | 0
Rmodules/template_engine/components/html/set/SetComponent.class.php -> modules/template_engine/components/html/component_set/SetComponent.class.php | 0
Rmodules/template_engine/components/html/table/TableComponent.class.php -> modules/template_engine/components/html/component_table/TableComponent.class.php | 0
Rmodules/template_engine/components/html/table/table.js -> modules/template_engine/components/html/component_table/table.js | 0
Rmodules/template_engine/components/html/table/table.less -> modules/template_engine/components/html/component_table/table.less | 0
Rmodules/template_engine/components/html/text/TextComponent.class.php -> modules/template_engine/components/html/component_text/TextComponent.class.php | 0
Rmodules/template_engine/components/html/upload/UploadComponent.class.php -> modules/template_engine/components/html/component_upload/UploadComponent.class.php | 0
Rmodules/template_engine/components/html/upload/upload.js -> modules/template_engine/components/html/component_upload/upload.js | 0
Rmodules/template_engine/components/html/upload/upload.less -> modules/template_engine/components/html/component_upload/upload.less | 0
Rmodules/template_engine/components/html/user/UserComponent.class.php -> modules/template_engine/components/html/component_user/UserComponent.class.php | 0
Rmodules/template_engine/components/html/user/component-user.php -> modules/template_engine/components/html/component_user/component-user.php | 0
Dmodules/template_engine/components/html/if/IfComponent.class.php | 53-----------------------------------------------------
50 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/modules/template_engine/components/html/button/ButtonComponent.class.php b/modules/template_engine/components/html/component_button/ButtonComponent.class.php diff --git a/modules/template_engine/components/html/checkbox/CheckboxComponent.class.php b/modules/template_engine/components/html/component_checkbox/CheckboxComponent.class.php diff --git a/modules/template_engine/components/html/column/ColumnComponent.class.php b/modules/template_engine/components/html/component_column/ColumnComponent.class.php diff --git a/modules/template_engine/components/html/column/column.js b/modules/template_engine/components/html/component_column/column.js diff --git a/modules/template_engine/components/html/date/DateComponent.class.php b/modules/template_engine/components/html/component_date/DateComponent.class.php diff --git a/modules/template_engine/components/html/date/component-date.php b/modules/template_engine/components/html/component_date/component-date.php diff --git a/modules/template_engine/components/html/editor/EditorComponent.class.php b/modules/template_engine/components/html/component_editor/EditorComponent.class.php diff --git a/modules/template_engine/components/html/editor/editor.js b/modules/template_engine/components/html/component_editor/editor.js diff --git a/modules/template_engine/components/html/editor/editor.less b/modules/template_engine/components/html/component_editor/editor.less diff --git a/modules/template_engine/components/html/else/ElseComponent.class.php b/modules/template_engine/components/html/component_else/ElseComponent.class.php diff --git a/modules/template_engine/components/html/form/FormComponent.class.php b/modules/template_engine/components/html/component_form/FormComponent.class.php diff --git a/modules/template_engine/components/html/group/GroupComponent.class.php b/modules/template_engine/components/html/component_group/GroupComponent.class.php diff --git a/modules/template_engine/components/html/group/group.js b/modules/template_engine/components/html/component_group/group.js diff --git a/modules/template_engine/components/html/group/group.less b/modules/template_engine/components/html/component_group/group.less diff --git a/modules/template_engine/components/html/hidden/HiddenComponent.class.php b/modules/template_engine/components/html/component_hidden/HiddenComponent.class.php diff --git a/modules/template_engine/components/html/component_if/IfComponent.class.php b/modules/template_engine/components/html/component_if/IfComponent.class.php @@ -0,0 +1,53 @@ +<?php + +namespace template_engine\components\html\_if; + +use template_engine\components\html\Component; +use template_engine\element\PHPBlockElement; + +class IfComponent extends Component +{ + public $true; + public $false; + public $contains; + public $value; + public $empty; + public $equals; + public $lessthan; + public $greaterthan; + public $present; + public $not; + + + public function createElement() + { + $if = new PHPBlockElement(); + + $expr = '$if'.$this->getDepth().'='.(!isset($this->not)?'':'!').'('; + if ( $this->true ) + $expr .= $if->value($this->true); + elseif ($this->false) + $expr .= '!' . $if->value($this->false); + elseif ($this->contains) + $expr .= 'in_array('.$if->value($this->value).',explode(",",'.$if->value($this->contains).')'; + elseif ($this->equals) + $expr .= '' . $if->value($this->value).'==\''.$if->value($this->equals).'\''; + elseif ($this->lessthan) + $expr .= 'intval(' . $if->value($this->lessthan).')>intval('.$if->value($this->value).')'; + elseif ($this->greaterthan) + $expr .= 'intval(' . $if->value($this->greaterthan).')<count('.$if->value($this->value).')'; + elseif (! empty($this->present)) + $expr .= 'isset(' . '$'.$this->present.')'; // 'isset' verwenden! Nicht empty(), da false empty ist. + elseif (! empty($this->empty)) + $expr .= '(' . $if->value($this->empty).')==FALSE'; + elseif ($this->value) + $expr .= $if->value($this->value); + else + throw new \LogicException("Element 'if' has not enough parameters."); + $expr .= ');'; + + $if->beforeBlock = $expr . ' if($if'.$this->getDepth().')'; + + return $if; + } +} diff --git a/modules/template_engine/components/html/image/ImageComponent.class.php b/modules/template_engine/components/html/component_image/ImageComponent.class.php diff --git a/modules/template_engine/components/html/image/image.js b/modules/template_engine/components/html/component_image/image.js diff --git a/modules/template_engine/components/html/image/image.less b/modules/template_engine/components/html/component_image/image.less diff --git a/modules/template_engine/components/html/include/IncludeComponent.class.php b/modules/template_engine/components/html/component_include/IncludeComponent.class.php diff --git a/modules/template_engine/components/html/input/InputComponent.class.php b/modules/template_engine/components/html/component_input/InputComponent.class.php diff --git a/modules/template_engine/components/html/inputarea/InputareaComponent.class.php b/modules/template_engine/components/html/component_inputarea/InputareaComponent.class.php diff --git a/modules/template_engine/components/html/insert/InsertComponent.class.php b/modules/template_engine/components/html/component_insert/InsertComponent.class.php diff --git a/modules/template_engine/components/html/label/LabelComponent.class.php b/modules/template_engine/components/html/component_label/LabelComponent.class.php diff --git a/modules/template_engine/components/html/link/LinkComponent.class.php b/modules/template_engine/components/html/component_link/LinkComponent.class.php diff --git a/modules/template_engine/components/html/link/link.js b/modules/template_engine/components/html/component_link/link.js diff --git a/modules/template_engine/components/html/list/ListComponent.class.php b/modules/template_engine/components/html/component_list/ListComponent.class.php diff --git a/modules/template_engine/components/html/logo/LogoComponent.class.php b/modules/template_engine/components/html/component_logo/LogoComponent.class.php diff --git a/modules/template_engine/components/html/newline/NewlineComponent.class.php b/modules/template_engine/components/html/component_newline/NewlineComponent.class.php diff --git a/modules/template_engine/components/html/output/OutputComponent.class.php b/modules/template_engine/components/html/component_output/OutputComponent.class.php diff --git a/modules/template_engine/components/html/part/PartComponent.class.php b/modules/template_engine/components/html/component_part/PartComponent.class.php diff --git a/modules/template_engine/components/html/password/PasswordComponent.class.php b/modules/template_engine/components/html/component_password/PasswordComponent.class.php diff --git a/modules/template_engine/components/html/qrcode/QrcodeComponent.class.php b/modules/template_engine/components/html/component_qrcode/QrcodeComponent.class.php diff --git a/modules/template_engine/components/html/qrcode/qrcode.js b/modules/template_engine/components/html/component_qrcode/qrcode.js diff --git a/modules/template_engine/components/html/radio/RadioComponent.class.php b/modules/template_engine/components/html/component_radio/RadioComponent.class.php diff --git a/modules/template_engine/components/html/radiobox/RadioboxComponent.class.php b/modules/template_engine/components/html/component_radiobox/RadioboxComponent.class.php diff --git a/modules/template_engine/components/html/row/RowComponent.class.php b/modules/template_engine/components/html/component_row/RowComponent.class.php diff --git a/modules/template_engine/components/html/selectbox/SelectboxComponent.class.php b/modules/template_engine/components/html/component_selectbox/SelectboxComponent.class.php diff --git a/modules/template_engine/components/html/selector/SelectorComponent.class.php b/modules/template_engine/components/html/component_selector/SelectorComponent.class.php diff --git a/modules/template_engine/components/html/set/SetComponent.class.php b/modules/template_engine/components/html/component_set/SetComponent.class.php diff --git a/modules/template_engine/components/html/table/TableComponent.class.php b/modules/template_engine/components/html/component_table/TableComponent.class.php diff --git a/modules/template_engine/components/html/table/table.js b/modules/template_engine/components/html/component_table/table.js diff --git a/modules/template_engine/components/html/table/table.less b/modules/template_engine/components/html/component_table/table.less diff --git a/modules/template_engine/components/html/text/TextComponent.class.php b/modules/template_engine/components/html/component_text/TextComponent.class.php diff --git a/modules/template_engine/components/html/upload/UploadComponent.class.php b/modules/template_engine/components/html/component_upload/UploadComponent.class.php diff --git a/modules/template_engine/components/html/upload/upload.js b/modules/template_engine/components/html/component_upload/upload.js diff --git a/modules/template_engine/components/html/upload/upload.less b/modules/template_engine/components/html/component_upload/upload.less diff --git a/modules/template_engine/components/html/user/UserComponent.class.php b/modules/template_engine/components/html/component_user/UserComponent.class.php diff --git a/modules/template_engine/components/html/user/component-user.php b/modules/template_engine/components/html/component_user/component-user.php diff --git a/modules/template_engine/components/html/if/IfComponent.class.php b/modules/template_engine/components/html/if/IfComponent.class.php @@ -1,53 +0,0 @@ -<?php - -namespace template_engine\components; - -use template_engine\components\html\Component; -use template_engine\element\PHPBlockElement; - -class IfComponent extends Component -{ - public $true; - public $false; - public $contains; - public $value; - public $empty; - public $equals; - public $lessthan; - public $greaterthan; - public $present; - public $not; - - - public function createElement() - { - $if = new PHPBlockElement(); - - $expr = '$if'.$this->getDepth().'='.(!isset($this->not)?'':'!').'('; - if ( $this->true ) - $expr .= $if->value($this->true); - elseif ($this->false) - $expr .= '!' . $if->value($this->false); - elseif ($this->contains) - $expr .= 'in_array('.$if->value($this->value).',explode(",",'.$if->value($this->contains).')'; - elseif ($this->equals) - $expr .= '' . $if->value($this->value).'==\''.$if->value($this->equals).'\''; - elseif ($this->lessthan) - $expr .= 'intval(' . $if->value($this->lessthan).')>intval('.$if->value($this->value).')'; - elseif ($this->greaterthan) - $expr .= 'intval(' . $if->value($this->greaterthan).')<count('.$if->value($this->value).')'; - elseif (! empty($this->present)) - $expr .= 'isset(' . '$'.$this->present.')'; // 'isset' verwenden! Nicht empty(), da false empty ist. - elseif (! empty($this->empty)) - $expr .= '(' . $if->value($this->empty).')==FALSE'; - elseif ($this->value) - $expr .= $if->value($this->value); - else - throw new \LogicException("Element 'if' has not enough parameters."); - $expr .= ');'; - - $if->beforeBlock = $expr . ' if($if'.$this->getDepth().')'; - - return $if; - } -}