├── .php-cs-fixer.cache ├── LICENSE.md ├── README.md ├── SECURITY.md ├── composer.json ├── doc ├── OutputDataConfigToolkitListener.php ├── ProductListSpecification.php ├── classificationstore.md └── img │ ├── classification_all.jpg │ ├── classification_all_grouped.jpg │ ├── classification_relevant.jpg │ ├── editor.png │ └── list.png ├── install └── config.php └── src ├── ConfigAttribute ├── AbstractConfigAttribute.php ├── AbstractConfigAttributeOperator.php ├── AbstractConfigAttributeValue.php ├── IConfigAttribute.php ├── Operator │ └── Concatenator.php └── Value │ └── DefaultValue.php ├── ConfigElement ├── AbstractConfigElement.php ├── IConfigElement.php ├── Operator │ ├── AbstractOperator.php │ ├── CellFormater.php │ ├── Concatenator.php │ ├── Group.php │ ├── Table.php │ ├── TableCol.php │ ├── TableRow.php │ ├── Text.php │ ├── TextAddon.php │ └── TranslateValue.php └── Value │ ├── DefaultValue.php │ ├── DimensionUnitField.php │ ├── DimensionUnitFieldText.php │ ├── Numeric.php │ └── StructuredTable.php ├── Constant └── ColumnConfigDisplayMode.php ├── Controller ├── AdminController.php └── ClassController.php ├── DependencyInjection ├── Configuration.php └── OutputDataConfigToolkitExtension.php ├── Event ├── GroupClassificationStoreEvent.php ├── InitializeEvent.php ├── OutputDataConfigToolkitEvents.php └── SaveConfigEvent.php ├── Migrations ├── Version20221130082116.php └── Version20240823111615.php ├── OutputDataConfigToolkitBundle.php ├── OutputDefinition.php ├── OutputDefinition ├── Dao.php ├── Listing.php └── Listing │ └── Dao.php ├── Resources ├── config │ ├── packages │ │ └── doctrine_migrations.yaml │ ├── pimcore │ │ ├── config.yml │ │ └── routing.yml │ └── services.yml ├── public │ ├── css │ │ └── admin.css │ ├── img │ │ └── outline-chrome_reader_mode-24px.svg │ └── js │ │ ├── Bundle.js │ │ ├── ClassTree.js │ │ ├── OutputDataConfigDialog.js │ │ ├── OutputDataConfigTab.js │ │ └── outputDataConfigElements │ │ ├── Abstract.js │ │ ├── operator │ │ ├── CellFormater.js │ │ ├── Concatenator.js │ │ ├── Group.js │ │ ├── Table.js │ │ ├── TableCol.js │ │ ├── TableRow.js │ │ ├── Text.js │ │ ├── TextAddon.js │ │ └── TranslateValue.js │ │ └── value │ │ ├── DefaultValue.js │ │ ├── DimensionUnitField.js │ │ ├── DimensionUnitFieldText.js │ │ ├── KeyValue.js │ │ ├── Numeric.js │ │ └── StructuredTable.js └── translations │ ├── admin.ca.yml │ ├── admin.cs.yml │ ├── admin.de.yml │ ├── admin.en.yml │ ├── admin.es.yml │ ├── admin.fr.yml │ ├── admin.hu.yml │ ├── admin.it.yml │ ├── admin.nl.yml │ ├── admin.pl.yml │ ├── admin.pt_br.yml │ ├── admin.ro.yml │ ├── admin.sk.yml │ ├── admin.sv.yml │ ├── admin.th.yml │ └── admin.zh_Hans.yml ├── Service.php └── Tools ├── Installer.php └── Util.php /.php-cs-fixer.cache: -------------------------------------------------------------------------------- 1 | {"php":"8.3.20","version":"3.75.0","indent":" ","lineEnding":"\n","rules":{"encoding":true,"full_opening_tag":true,"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","do","else","elseif","final","for","foreach","function","if","interface","namespace","private","protected","public","static","switch","trait","try","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"array_syntax":{"syntax":"short"},"header_comment":{"comment_type":"PHPDoc","header":"This source file is available under the terms of the\nPimcore Open Core License (POCL)\nFull copyright and license information is available in\nLICENSE.md which is distributed with this source code.\n\n @copyright Copyright (c) Pimcore GmbH (https:\/\/www.pimcore.com)\n @license Pimcore Open Core License (POCL)"},"blank_line_before_statement":true,"function_typehint_space":true,"single_line_comment_style":true,"lowercase_cast":true,"magic_constant_casing":true,"class_attributes_separation":true,"native_function_casing":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":true,"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_short_bool_cast":true,"no_spaces_around_offset":true,"no_unneeded_control_parentheses":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"object_operator_without_whitespace":true,"ordered_imports":true,"phpdoc_indent":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"return_type_declaration":true,"self_accessor":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_quote":true,"space_after_semicolon":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"whitespace_after_comma_in_array":true},"hashes":{"src\/Controller\/AdminController.php":"94eacde6400652a2fb4735add9508f47","src\/Controller\/ClassController.php":"cb400c062a652cd9ac72037609e962bc","src\/DependencyInjection\/Configuration.php":"05d4445ebb5f64cf73e12fdcd9c1a6cb","src\/DependencyInjection\/OutputDataConfigToolkitExtension.php":"550486a3c7eea0a362cfbecdf670beb0","src\/OutputDataConfigToolkitBundle.php":"e4afe887ee349e0e8b94ecb7935664bb","src\/Constant\/ColumnConfigDisplayMode.php":"8f0a59141d097481f9adcf31cda109f2","src\/ConfigElement\/Operator\/TranslateValue.php":"4b041e0a365861a1d3737948d61f93cd","src\/ConfigElement\/Operator\/Text.php":"75cd8503ce7a51113d4e853e0149bfce","src\/ConfigElement\/Operator\/CellFormater.php":"25892b4db22bee89b90e5dfee38d92ee","src\/ConfigElement\/Operator\/TableCol.php":"48f45f7ad6ed1fd842f1b24499790949","src\/ConfigElement\/Operator\/TableRow.php":"a96682c560d3e78c049f211d96e8fc85","src\/ConfigElement\/Operator\/Group.php":"d33800afdba27257429163f23c0509ed","src\/ConfigElement\/Operator\/Table.php":"c11660e6d9c766af7d3ea63868f12394","src\/ConfigElement\/Operator\/TextAddon.php":"bb9971a18dae4974c269ab6dbe33229b","src\/ConfigElement\/Operator\/Concatenator.php":"5d9f4b70e5234715ff27c73ec9e0a7ce","src\/ConfigElement\/Operator\/AbstractOperator.php":"103d9929bc7ac1b6fc9ec59f438a7c1b","src\/ConfigElement\/IConfigElement.php":"e39b348ddcc60eeccb1bbb5d8c3492b6","src\/ConfigElement\/Value\/Numeric.php":"db8b0c19f064b44e25f71e38dfd7b9b3","src\/ConfigElement\/Value\/DimensionUnitField.php":"9dfc254da5344859c16452a252399083","src\/ConfigElement\/Value\/DimensionUnitFieldText.php":"0ef74e45bb1429a85afbf713994ecee2","src\/ConfigElement\/Value\/StructuredTable.php":"edc8d3e21a73f178989f1b5679211d7f","src\/ConfigElement\/Value\/DefaultValue.php":"02cdcb3573d4743ad74bb70d8dcbe57a","src\/ConfigElement\/AbstractConfigElement.php":"f1eeb82b8217b3119c49e8d0bd66fb86","src\/Migrations\/Version20221130082116.php":"1c51d916dc44493cc4bf516f18d735ae","src\/Migrations\/Version20240823111615.php":"1796f446817fc08c435991c3c3f60197","src\/Service.php":"fc5ad5809752173b8832991fa14716e1","src\/OutputDefinition\/Listing.php":"dcd453935ad30e0c2cf12e9149c9e7bc","src\/OutputDefinition\/Dao.php":"259cd0f73336cce14c89a379c53799f7","src\/OutputDefinition\/Listing\/Dao.php":"b5e51e19f132df4353908a1860cae4bc","src\/Tools\/Util.php":"2f1c656a8dc43e21e7e9cce9922e7f7c","src\/Tools\/Installer.php":"bf727bfaff29d94283a2e449bfb885ed","src\/ConfigAttribute\/AbstractConfigAttributeValue.php":"ad1dc1b008df3c67514dbaf820fd4936","src\/ConfigAttribute\/AbstractConfigAttributeOperator.php":"08989635ebe737f8948034bf6bb82fdc","src\/ConfigAttribute\/Operator\/Concatenator.php":"2916df6ca3dd59b18c2ea8c3d12278c6","src\/ConfigAttribute\/IConfigAttribute.php":"c433a28b771d7a1e8d672e9f7f80b511","src\/ConfigAttribute\/Value\/DefaultValue.php":"dcb32fd07f28846c2523776ec4793c77","src\/ConfigAttribute\/AbstractConfigAttribute.php":"6885c9ee972b306ef166683269509326","src\/Event\/OutputDataConfigToolkitEvents.php":"448f56b5f75c91327fd85f746c7b5299","src\/Event\/InitializeEvent.php":"cb8cd1a9420e38fd4a71bf5b7f6441c2","src\/Event\/SaveConfigEvent.php":"f6ddaad0edfbfe51fac7f0b8ec2db90f","src\/Event\/GroupClassificationStoreEvent.php":"0afabc412f910dbdc60a18af14979b9c","src\/OutputDefinition.php":"a930ec491f6afc93ad0f456855aa10a6"}} -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | If you think that you have found a security issue, 6 | don’t use the bug tracker and don’t publish it publicly. 7 | Instead, all security issues must be reported via a private vulnerability report. 8 | 9 | Please follow the [instructions](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) to submit a private report. 10 | 11 | 12 | ## Resolving Process 13 | Every submitted security issue is handled with top priority by following these steps: 14 | 15 | 1. Confirm the vulnerability 16 | 2. Determine the severity 17 | 3. Contact reporter 18 | 4. Work on a patch 19 | 5. Get a CVE identification number (may be done by the reporter or a security service provider) 20 | 6. Patch reviewing 21 | 7. Tagging a new release for supported versions 22 | 8. Publish security announcement 23 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pimcore/output-data-config-toolkit-bundle", 3 | "license": "proprietary", 4 | "type": "pimcore-bundle", 5 | "prefer-stable": true, 6 | "minimum-stability": "dev", 7 | "require": { 8 | "php": "~8.3.0 || ~8.4.0", 9 | "pimcore/pimcore": "^12.0", 10 | "symfony/event-dispatcher-contracts": "^3.0" 11 | }, 12 | "require-dev": { 13 | "phpstan/phpstan": "^1.12.15", 14 | "phpstan/phpstan-symfony": "^1.2.20" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "OutputDataConfigToolkitBundle\\": "src/" 19 | } 20 | }, 21 | "config": { 22 | "allow-plugins": { 23 | "symfony/runtime": true 24 | } 25 | }, 26 | "extra": { 27 | "pimcore": { 28 | "bundles": [ 29 | "OutputDataConfigToolkitBundle\\OutputDataConfigToolkitBundle" 30 | ] 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /doc/OutputDataConfigToolkitListener.php: -------------------------------------------------------------------------------- 1 | "onInitialize" 32 | ]; 33 | } 34 | 35 | /** 36 | * Manipulate outputdataconfigtoolkit initialization 37 | * - only show output config tab for product objects 38 | * - always use product root 39 | * 40 | * @param InitializeEvent $event 41 | */ 42 | public function onInitialize(InitializeEvent $event) 43 | { 44 | $object = $event->getObject(); 45 | if (!$object instanceof Concrete || $object->getClassName() != substr(strrchr(Product::class, "\\"), 1)) { 46 | $event->setHideConfigTab(true); 47 | } else { 48 | while ( 49 | $object->getParentId() != 1 50 | && !$object->getParent() instanceof Folder 51 | && ($object = $object->getParent()) 52 | ); 53 | } 54 | $event->setObject($object); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /doc/ProductListSpecification.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 29 | } 30 | 31 | /** 32 | * @inheritDoc 33 | */ 34 | public function getName() 35 | { 36 | return 'productDetailSpecification'; 37 | } 38 | 39 | 40 | public function __invoke($property, $product) { 41 | if($property instanceof Group) { 42 | $labeledValue = $property->getLabeledValue($product); 43 | if($labeledValue) { 44 | $result = " 45 | 46 | " . $this->translator->trans("attr." . $property->getLabel()) . " 47 | 48 | "; 49 | 50 | foreach($property->getChilds() as $child) { 51 | 52 | $result .= $this->__invoke($child, $product); 53 | 54 | } 55 | 56 | return $result; 57 | } 58 | 59 | } else if($property instanceof DefaultValue || 60 | $property instanceof Concatenator) { 61 | $labeledValue = $property->getLabeledValue($product); 62 | if($labeledValue->def instanceof Select) { 63 | $value = $this->getSelectValue($labeledValue->def, $labeledValue->value); 64 | } else if($labeledValue->def instanceof Multiselect) { 65 | 66 | $values = $labeledValue->value; 67 | $translatedValues = array(); 68 | if(is_array($values)) { 69 | foreach($values as $value) { 70 | $translatedValues[] = $this->getSelectValue($labeledValue->def, $value); 71 | } 72 | 73 | $value = "
" . implode("
", $translatedValues) . "
"; 74 | } else { 75 | $value = ''; 76 | } 77 | 78 | 79 | } else if($labeledValue->def instanceof ManyToManyObjectRelation) { 80 | 81 | $names = array(); 82 | if(is_array($labeledValue->value)) { 83 | foreach($labeledValue->value as $entry) { 84 | if($entry instanceof AbstractObject && method_exists($entry, "getName")) { 85 | $names[] = $entry->getName(); 86 | } 87 | } 88 | } 89 | 90 | $value = implode(", ", $names); 91 | 92 | } else if($labeledValue->value instanceof AbstractObject && method_exists($labeledValue->value, "getName")) { 93 | $value = $labeledValue->value->getName(); 94 | } else if($labeledValue->def instanceof Checkbox) { 95 | $value = $this->translator->trans("optionvalue." . ($labeledValue->value ? "true" : "false")); 96 | } else if($labeledValue->def instanceof Image) { 97 | $value = ''; 98 | } else { 99 | $value = $labeledValue->value; 100 | if(is_object($value)) { 101 | p_r($labeledValue); 102 | p_r($property); 103 | die(); 104 | } 105 | } 106 | 107 | if($labeledValue->value) { 108 | $result = " 109 | 110 | " . $this->translator->trans("attr." . $labeledValue->label) . " 111 | " . $value . " 112 | 113 | "; 114 | return $result; 115 | } 116 | 117 | } else { 118 | p_r($property); 119 | } 120 | 121 | } 122 | 123 | 124 | private function getSelectValue($def, $value) { 125 | return $this->translator->trans("optionvalue." . $value); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /doc/classificationstore.md: -------------------------------------------------------------------------------- 1 | ### Classificationstore 2 | Via the config option `output_data_config_toolkit.classification_store.display_mode` it is possible to choose 3 | different display modes for classification store keys in the output definition config window: 4 | 1. `all`: all classificationstore keys are displayed at the bottom of the config tree 5 | 2. `object`: only keys which are in any assigned group of the current object 6 | 3. `relevant`: `object` mode is used if any group is assigned, else `all` keys are shown 7 | 4. `none`: No classificationstore keys are displayed 8 | 9 | ##### DisplayMode `all` or `relevant` and type is folder or the object has no assigned group 10 | ![image](img/classification_all.jpg) 11 | 12 | ##### DisplayMode `all` and Grouped `true` 13 | ![image](img/classification_all_grouped.jpg) 14 | 15 | 16 | ##### DisplayMode `object` or `relevant` and object has any assigned group 17 | ![image](img/classification_relevant.jpg) 18 | 19 | #### Get classificationstore key value, assign classificationstore name and classificationstore group. 20 | for eq. 21 | ```php 22 | $outputDataConfig = OutputDataConfigToolkitBundle\Service::getOutputDataConfig($object, 'Output config channel'); 23 | $outputDataConfig[0]->setClassificationstore('Attributes'); ### classificationstore field name in object 24 | $outputDataConfig[0]->setClassificationstoreGroup('Product'); ### Classificationstore group name 25 | # the old way was access the values directly 26 | // $outputDataConfig[0]->classificationstore = 'Attributes'; ### classificationstore field name in object 27 | // $outputDataConfig[0]->classificationstore_group = 'Product'; ### Classificationstore group name 28 | $outputDataConfig[0]->getLabeledValue($object); 29 | ``` -------------------------------------------------------------------------------- /doc/img/classification_all.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/output-data-config-toolkit/79a8c752cba306cfd6a0aa3f0c23cbe8c4b79fef/doc/img/classification_all.jpg -------------------------------------------------------------------------------- /doc/img/classification_all_grouped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/output-data-config-toolkit/79a8c752cba306cfd6a0aa3f0c23cbe8c4b79fef/doc/img/classification_all_grouped.jpg -------------------------------------------------------------------------------- /doc/img/classification_relevant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/output-data-config-toolkit/79a8c752cba306cfd6a0aa3f0c23cbe8c4b79fef/doc/img/classification_relevant.jpg -------------------------------------------------------------------------------- /doc/img/editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/output-data-config-toolkit/79a8c752cba306cfd6a0aa3f0c23cbe8c4b79fef/doc/img/editor.png -------------------------------------------------------------------------------- /doc/img/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/output-data-config-toolkit/79a8c752cba306cfd6a0aa3f0c23cbe8c4b79fef/doc/img/list.png -------------------------------------------------------------------------------- /install/config.php: -------------------------------------------------------------------------------- 1 | [ 5 | "channel1", 6 | "channel2" 7 | ] 8 | ]; -------------------------------------------------------------------------------- /src/ConfigAttribute/AbstractConfigAttribute.php: -------------------------------------------------------------------------------- 1 | label; 42 | } 43 | 44 | /** 45 | * @param string|null $label 46 | * 47 | * @return $this 48 | */ 49 | public function setLabel(?string $label): static 50 | { 51 | $this->label = $label; 52 | 53 | return $this; 54 | } 55 | 56 | /** 57 | * @return string|null 58 | */ 59 | public function getType(): ?string 60 | { 61 | return $this->type; 62 | } 63 | 64 | /** 65 | * @param string|null $type 66 | * 67 | * @return $this 68 | */ 69 | public function setType(?string $type): static 70 | { 71 | $this->type = $type; 72 | 73 | return $this; 74 | } 75 | 76 | /** 77 | * @return string|null 78 | */ 79 | public function getClass(): ?string 80 | { 81 | return $this->class; 82 | } 83 | 84 | /** 85 | * @param string|null $class 86 | * 87 | * @return $this 88 | */ 89 | public function setClass(?string $class): static 90 | { 91 | $this->class = $class; 92 | 93 | return $this; 94 | } 95 | 96 | /** 97 | * @return IConfigAttribute[] 98 | */ 99 | public function getChilds(): array 100 | { 101 | return isset($this->childs) ? $this->childs : []; 102 | } 103 | 104 | /** 105 | * @param AbstractConfigAttribute[] $childs 106 | * 107 | * @return $this 108 | */ 109 | public function setChilds(array $childs): static 110 | { 111 | $this->childs = $childs; 112 | 113 | return $this; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /src/ConfigAttribute/AbstractConfigAttributeOperator.php: -------------------------------------------------------------------------------- 1 | setType('operator'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/ConfigAttribute/AbstractConfigAttributeValue.php: -------------------------------------------------------------------------------- 1 | setAttribute('#cs#' . implode('#', [$keyConfig->getId(), $keyConfig->getName()])) 45 | ->setText($keyConfig->getName()) 46 | ->setDataType($keyConfig->getType()); 47 | } 48 | 49 | /** 50 | * @return string|null 51 | */ 52 | public function getAttribute(): ?string 53 | { 54 | return $this->attribute; 55 | } 56 | 57 | /** 58 | * @param string|null $attribute 59 | * 60 | * @return $this 61 | */ 62 | public function setAttribute(?string $attribute): static 63 | { 64 | $this->attribute = $attribute; 65 | 66 | return $this; 67 | } 68 | 69 | /** 70 | * @return string|null 71 | */ 72 | public function getDataType(): ?string 73 | { 74 | return $this->dataType; 75 | } 76 | 77 | /** 78 | * @param string|null $dataType 79 | * 80 | * @return $this 81 | */ 82 | public function setDataType(?string $dataType): static 83 | { 84 | $this->dataType = $dataType; 85 | 86 | return $this; 87 | } 88 | 89 | /** 90 | * @return string|null 91 | */ 92 | public function getIcon(): ?string 93 | { 94 | return $this->icon; 95 | } 96 | 97 | /** 98 | * @param string|null $icon 99 | * 100 | * @return $this 101 | */ 102 | public function setIcon(?string $icon): static 103 | { 104 | $this->icon = $icon; 105 | 106 | return $this; 107 | } 108 | 109 | /** 110 | * @return string|null 111 | */ 112 | public function getText(): ?string 113 | { 114 | return $this->text; 115 | } 116 | 117 | /** 118 | * @param string|null $text 119 | * 120 | * @return $this 121 | */ 122 | public function setText(?string $text): static 123 | { 124 | $this->text = $text; 125 | 126 | return $this; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /src/ConfigAttribute/IConfigAttribute.php: -------------------------------------------------------------------------------- 1 | setClass(Util::getClassName(ConcatenatorElement::class)); 37 | } 38 | 39 | /** 40 | * @return string|null 41 | */ 42 | public function getGlue(): ?string 43 | { 44 | return $this->glue; 45 | } 46 | 47 | /** 48 | * @param string|null $glue 49 | * 50 | * @return $this 51 | */ 52 | public function setGlue(?string $glue): static 53 | { 54 | $this->glue = $glue; 55 | 56 | return $this; 57 | } 58 | 59 | /** 60 | * @return bool 61 | */ 62 | public function isForceValue(): bool 63 | { 64 | return $this->forceValue; 65 | } 66 | 67 | /** 68 | * @param bool $forceValue 69 | * 70 | * @return $this 71 | */ 72 | public function setForceValue(bool $forceValue): static 73 | { 74 | $this->forceValue = $forceValue; 75 | 76 | return $this; 77 | } 78 | 79 | /** 80 | * @return bool 81 | */ 82 | public function isFormatNumbers(): bool 83 | { 84 | return $this->formatNumbers; 85 | } 86 | 87 | /** 88 | * @param bool $formatNumbers 89 | * 90 | * @return $this 91 | */ 92 | public function setFormatNumbers(bool $formatNumbers): static 93 | { 94 | $this->formatNumbers = $formatNumbers; 95 | 96 | return $this; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/ConfigAttribute/Value/DefaultValue.php: -------------------------------------------------------------------------------- 1 | setDataType('input') 33 | ->setType('value') 34 | ->setClass(Util::getClassName(DefaultValueElement::class)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/ConfigElement/AbstractConfigElement.php: -------------------------------------------------------------------------------- 1 | attribute = $config->attribute ?? null; 32 | $this->label = $config->label; 33 | 34 | $this->context = $context; 35 | } 36 | 37 | public function getLabel() 38 | { 39 | return $this->label; 40 | } 41 | 42 | public function getClassificationstore(): ?string 43 | { 44 | return $this->classificationstore; 45 | } 46 | 47 | public function getClassificationstoreGroup(): ?string 48 | { 49 | return $this->classificationstore_group; 50 | } 51 | 52 | public function setClassificationstore(?string $classificationstore): void 53 | { 54 | $this->classificationstore = $classificationstore; 55 | } 56 | 57 | public function setClassificationstoreGroup(?string $classificationstore_group): void 58 | { 59 | $this->classificationstore_group = $classificationstore_group; 60 | } 61 | 62 | public function getAttribute() 63 | { 64 | return $this->attribute; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/ConfigElement/IConfigElement.php: -------------------------------------------------------------------------------- 1 | childs; 31 | } 32 | 33 | public function __construct($config, $context = null) 34 | { 35 | parent::__construct($config, $context); 36 | $this->childs = $config->childs ?? []; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/CellFormater.php: -------------------------------------------------------------------------------- 1 | cssClass = $config->cssClass; 28 | $this->styles = $config->styles; 29 | $this->label = $config->cssClass; 30 | $this->labelStyles = $config->labelStyles; 31 | } 32 | 33 | public function getLabeledValue($object) 34 | { 35 | $childs = $this->getChilds(); 36 | if ($childs) { 37 | return $childs[0]->getLabeledValue($object); 38 | } 39 | 40 | return null; 41 | } 42 | 43 | public function getCssClass() 44 | { 45 | return $this->cssClass; 46 | } 47 | 48 | public function setStyles($styles) 49 | { 50 | $this->styles = $styles; 51 | } 52 | 53 | public function getStyles() 54 | { 55 | return $this->styles; 56 | } 57 | 58 | public function setLabelStyles($styles) 59 | { 60 | $this->labelStyles = $styles; 61 | } 62 | 63 | public function getLabelStyles() 64 | { 65 | return $this->labelStyles; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/Concatenator.php: -------------------------------------------------------------------------------- 1 | glue = $config->glue; 29 | $this->forceValue = $config->forceValue ?? false; 30 | $this->formatNumbers = $config->formatNumbers ?? false; 31 | } 32 | 33 | public function getLabeledValue($object) 34 | { 35 | $result = new \stdClass(); 36 | $result->value = null; 37 | $result->label = $this->label; 38 | 39 | $hasValue = true; 40 | if (!$this->forceValue) { 41 | $hasValue = false; 42 | } 43 | 44 | $childs = $this->getChilds(); 45 | $valueArray = []; 46 | 47 | foreach ($childs as $c) { 48 | if ($c instanceof AbstractConfigElement) { 49 | $c->setClassificationstore($this->getClassificationstore()); 50 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 51 | } 52 | 53 | $value = $c->getLabeledValue($object) ? $c->getLabeledValue($object)->value : null; 54 | 55 | if (!$hasValue) { 56 | if (is_object($value) && method_exists($value, 'isEmpty')) { 57 | $hasValue = !$value->isEmpty(); 58 | } else { 59 | $hasValue = !empty($value); 60 | } 61 | } 62 | 63 | if ($this->formatNumbers && is_numeric($value)) { 64 | $formattingService = \Pimcore::getContainer()->get(\Pimcore\Localization\IntlFormatter::class); 65 | $value = $formattingService->formatNumber($value); 66 | } 67 | 68 | if ($value !== null) { 69 | $valueArray[] = $value; 70 | } 71 | } 72 | 73 | if ($hasValue) { 74 | $result->value = implode($this->glue, $valueArray); 75 | 76 | return $result; 77 | } else { 78 | $result->empty = true; 79 | 80 | return $result; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/Group.php: -------------------------------------------------------------------------------- 1 | getChilds(); 24 | foreach ($childs as $c) { 25 | if ($c instanceof AbstractConfigElement) { 26 | $c->setClassificationstore($this->getClassificationstore()); 27 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 28 | } 29 | $value = $c->getLabeledValue($object); 30 | if (!empty($value) && (!property_exists($value, 'empty') || !$value->empty) && (!method_exists($value, 'isEmpty') || !$value->isEmpty())) { 31 | $valueArray[] = $value; 32 | } 33 | } 34 | 35 | if (!empty($valueArray)) { 36 | return $valueArray; 37 | } 38 | 39 | return null; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/Table.php: -------------------------------------------------------------------------------- 1 | tooltip = $config->tooltip; 25 | } 26 | 27 | public function getLabeledValue($object) 28 | { 29 | $value = new \stdClass(); 30 | 31 | $childs = $this->getChilds(); 32 | 33 | $value->label = $this->label; 34 | $value->type = 'Operator_Table'; 35 | 36 | $isEmpty = false; 37 | $valueArray = []; 38 | foreach ($childs as $c) { 39 | if ($c instanceof AbstractConfigElement) { 40 | $c->setClassificationstore($this->getClassificationstore()); 41 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 42 | } 43 | $row = $c->getLabeledValue($object); 44 | $valueArray[] = $row; 45 | $isEmpty = $row->empty; 46 | } 47 | $value->empty = $isEmpty; 48 | $value->value = $valueArray; 49 | $value->tooltip = $this->tooltip; 50 | 51 | return $value; 52 | } 53 | 54 | public function getTooltip() 55 | { 56 | return $this->tooltip; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/TableCol.php: -------------------------------------------------------------------------------- 1 | colspan = $config->colspan; 28 | $this->headline = $config->headline; 29 | } 30 | 31 | public function getLabeledValue($object) 32 | { 33 | $value = null; 34 | 35 | $childs = $this->getChilds(); 36 | if ($childs) { 37 | $c = $childs[0]; 38 | if ($c instanceof AbstractConfigElement) { 39 | $c->setClassificationstore($this->getClassificationstore()); 40 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 41 | } 42 | $value = $c->getLabeledValue($object); 43 | $value->colSpan = $this->colspan; 44 | $value->headline = $this->headline; 45 | 46 | if (empty($value) || $childs[0] instanceof \OutputDataConfigToolkitBundle\ConfigElement\Operator\Text) { 47 | $value->empty = true; 48 | } 49 | } 50 | 51 | return $value; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/TableRow.php: -------------------------------------------------------------------------------- 1 | headline = $config->headline; 26 | } 27 | 28 | public function getLabeledValue($object) 29 | { 30 | $value = new \stdClass(); 31 | 32 | $isEmpty = true; 33 | $childs = $this->getChilds(); 34 | $valueArray = []; 35 | 36 | foreach ($childs as $c) { 37 | if ($c instanceof AbstractConfigElement) { 38 | $c->setClassificationstore($this->getClassificationstore()); 39 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 40 | } 41 | $col = $c->getLabeledValue($object); 42 | if (!empty($col) && (!$col->empty && !($c instanceof \OutputDataConfigToolkitBundle\ConfigElement\Operator\Text))) { 43 | $isEmpty = false; 44 | } 45 | $valueArray[] = $c->getLabeledValue($object); 46 | } 47 | 48 | $value->value = $valueArray; 49 | $value->headline = $this->headline; 50 | 51 | if ($isEmpty) { 52 | $value->empty = true; 53 | } else { 54 | $value->empty = false; 55 | } 56 | 57 | return $value; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/Text.php: -------------------------------------------------------------------------------- 1 | textValue = $config->textValue; 22 | $this->label = $config->label; 23 | 24 | $this->context = $context; 25 | } 26 | 27 | public function getLabeledValue($object) 28 | { 29 | $result = new \stdClass(); 30 | $result->label = $this->label; 31 | $result->value = $this->textValue; 32 | 33 | return $result; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/TextAddon.php: -------------------------------------------------------------------------------- 1 | addon = $config->addon; 26 | } 27 | 28 | public function getLabeledValue($object) 29 | { 30 | $childs = $this->getChilds(); 31 | if (!empty($childs)) { 32 | $c = $childs[0]; 33 | if ($c instanceof AbstractConfigElement) { 34 | $c->setClassificationstore($this->getClassificationstore()); 35 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 36 | } 37 | $value = $c->getLabeledValue($object); 38 | 39 | if (!is_null($value->value)) { 40 | $value->value = $value->value.$this->getAddon(); 41 | } 42 | 43 | return $value; 44 | } 45 | 46 | return null; 47 | } 48 | 49 | /** 50 | * @return mixed 51 | */ 52 | public function getAddon() 53 | { 54 | return $this->addon; 55 | } 56 | 57 | /** 58 | * @param mixed $addon 59 | */ 60 | public function setAddon($addon) 61 | { 62 | $this->addon = $addon; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ConfigElement/Operator/TranslateValue.php: -------------------------------------------------------------------------------- 1 | prefix = $config->prefix; 26 | } 27 | 28 | public function getLabeledValue($object) 29 | { 30 | $childs = $this->getChilds(); 31 | if ($childs) { 32 | $translator = \Pimcore::getContainer()->get('translator'); 33 | $c = $childs[0]; 34 | if ($c instanceof AbstractConfigElement) { 35 | $c->setClassificationstore($this->getClassificationstore()); 36 | $c->setClassificationstoreGroup($this->getClassificationstoreGroup()); 37 | } 38 | $value = $c->getLabeledValue($object); 39 | if ($value->value) { 40 | $value->value = $translator->trans($this->prefix . $value->value); 41 | } 42 | 43 | return $value; 44 | } 45 | 46 | return null; 47 | } 48 | 49 | /** 50 | * @return mixed 51 | */ 52 | public function getPrefix() 53 | { 54 | return $this->prefix; 55 | } 56 | 57 | /** 58 | * @param mixed $prefix 59 | */ 60 | public function setPrefix($prefix) 61 | { 62 | $this->prefix = $prefix; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ConfigElement/Value/DefaultValue.php: -------------------------------------------------------------------------------- 1 | icon = $config->icon ?? null; 33 | } 34 | 35 | public function getLabeledValue($object) 36 | { 37 | $attributeParts = explode('~', $this->attribute); 38 | $label = $this->label; 39 | 40 | $getter = 'get' . ucfirst($this->attribute); 41 | 42 | $brickType = null; 43 | $brickKey = null; 44 | $brickInfos = null; 45 | $brickfield = null; 46 | $brickTypeGetter = null; 47 | if (substr($this->attribute, 0, 1) == '~') { 48 | // key value, ignore for now 49 | } elseif (count($attributeParts) > 1) { 50 | $brickType = $attributeParts[0]; 51 | $brickKey = $attributeParts[1]; 52 | 53 | if ($brickKey && strpos($brickType, '?') === 0) { 54 | $definitionJson = substr($brickType, 1); 55 | $brickInfos = json_decode($definitionJson); 56 | $containerKey = $brickInfos->containerKey; 57 | $fieldName = $brickInfos->fieldname; 58 | $brickfield = $brickInfos->brickfield; 59 | 60 | $brickType = $containerKey; 61 | 62 | $getter = 'get'.ucfirst($fieldName); 63 | $brickTypeGetter = 'get'.ucfirst($brickType); 64 | $brickGetter = 'get'.ucfirst($brickfield); 65 | } elseif ($object instanceof Concrete) { 66 | $getter = 'get' . ucfirst(Service::getFieldForBrickType($object->getClass(), $brickType)); 67 | $brickTypeGetter = 'get' . ucfirst($brickType); 68 | $brickGetter = 'get' . ucfirst($brickKey); 69 | } 70 | } elseif (substr($this->attribute, 0, 4) == '#cs#') { 71 | return $this->getLabeledValueForClassificationStore($object); 72 | } 73 | if (method_exists($object, $getter) 74 | || (class_exists(DefaultMockup::class) && $object instanceof DefaultMockup)) { 75 | $value = $object->$getter(); 76 | $def = null; 77 | 78 | if ((class_exists(DefaultMockup::class) && $object instanceof DefaultMockup) 79 | || $object instanceof AbstractObject) { 80 | if ($object instanceof Concrete) { 81 | $class = $object->getClass(); 82 | $def = $class->getFieldDefinition($this->attribute); 83 | if (!$def) { 84 | $lf = $class->getFieldDefinition('localizedfields'); 85 | if ($lf instanceof Localizedfields) { 86 | $def = $lf->getFieldDefinition($this->attribute); 87 | } 88 | } 89 | } 90 | 91 | if (empty($label)) { 92 | if ($def) { 93 | $label = $def->getTitle(); 94 | } 95 | } 96 | 97 | if (!empty($value) && !empty($brickGetter)) { 98 | $brickDef = Definition::getByKey($brickType); 99 | $def = $brickDef->getFieldDefinition($brickKey); 100 | if (!$def) { 101 | $lf = $brickDef->getFieldDefinition('localizedfields'); 102 | if ($lf instanceof Localizedfields) { 103 | $def = $lf->getFieldDefinition($brickInfos ? $brickfield : $this->attribute); 104 | } 105 | } 106 | 107 | if (empty($label)) { 108 | if ($def) { 109 | $label = $def->getTitle(); 110 | } 111 | } 112 | 113 | if (is_object($value) && method_exists($value, $brickTypeGetter)) { 114 | $value = $value->$brickTypeGetter(); 115 | 116 | if (is_object($value) && method_exists($value, $brickGetter)) { 117 | $value = $value->$brickGetter(); 118 | } elseif ($brickInfos && !is_null($value)) { 119 | $lfs = $value->getLocalizedfields(); 120 | $value = $lfs->getLocalizedValue($brickfield); 121 | } else { 122 | $value = null; 123 | } 124 | } else { 125 | $value = null; 126 | } 127 | } 128 | } 129 | 130 | $result = new \stdClass(); 131 | $result->value = $value; 132 | $result->label = $label; 133 | 134 | if (empty($value) || (is_object($value) && method_exists($value, 'isEmpty') && $value->isEmpty())) { 135 | $result->empty = true; 136 | } else { 137 | $result->empty = false; 138 | } 139 | 140 | $result->def = $def; 141 | 142 | return $result; 143 | } 144 | 145 | return null; 146 | } 147 | 148 | protected function getLabeledValueForClassificationStore($object): ?object 149 | { 150 | // checking classification store fieldname 151 | if (!$this->getClassificationstore()) { 152 | return null; 153 | } 154 | $getter = 'get' . ucfirst($this->getClassificationstore()); 155 | // checking classification sote group 156 | if (!$this->getClassificationstoreGroup()) { 157 | return null; 158 | } 159 | $groupDef = Classificationstore\GroupConfig::getByName($this->getClassificationstoreGroup()); 160 | 161 | // classification store 162 | $attribute = str_replace('#cs#', '', $this->attribute); 163 | list($keyId) = explode('#', $attribute); 164 | 165 | $value = $object->$getter()->getLocalizedKeyValue($groupDef->getId(), $keyId); 166 | 167 | $result = new \stdClass(); 168 | $result->value = $value; 169 | $result->label = $this->label; 170 | $result->attribute = $this->attribute; 171 | 172 | $config = Classificationstore\KeyConfig::getById((int) $keyId); 173 | if ($config) { 174 | $result->def = Classificationstore\Service::getFieldDefinitionFromKeyConfig($config); 175 | } 176 | 177 | if (empty($value) || (is_object($value) && method_exists($value, 'isEmpty') && $value->isEmpty())) { 178 | $result->empty = true; 179 | } else { 180 | $result->empty = false; 181 | } 182 | 183 | return $result; 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /src/ConfigElement/Value/DimensionUnitField.php: -------------------------------------------------------------------------------- 1 | mode) { 30 | $this->mode = $config->mode; 31 | } 32 | } 33 | 34 | public function getLabeledValue($object) 35 | { 36 | $rawResult = parent::getLabeledValue($object); 37 | if ($this->mode == self::RAW_RESULT) { 38 | return $rawResult; 39 | } elseif (!empty($rawResult)) { 40 | $result = new \stdClass(); 41 | $result->label = $rawResult->label; 42 | $result->def = $rawResult->def ?? null; 43 | $result->value = null; 44 | 45 | $formatter = \Pimcore::getContainer()->get(\Pimcore\Localization\IntlFormatter::class); 46 | 47 | if (!empty($rawResult->value)) { 48 | if ($this->mode == self::ONLY_VALUE) { 49 | $value = $rawResult->value->getValue(); 50 | if (is_numeric($value)) { 51 | $value = $formatter->formatNumber($value); 52 | } 53 | $result->value = $value; 54 | } else { 55 | $value = $rawResult->value->getValue(); 56 | if (is_numeric($value)) { 57 | $value = $formatter->formatNumber($value); 58 | } 59 | $result->value = $value . ($rawResult->value->getUnit() ? ' ' . $rawResult->value->getUnit()->getAbbreviation() : ''); 60 | } 61 | } 62 | 63 | if (empty($result->value)) { 64 | $result->empty = true; 65 | } else { 66 | $result->empty = false; 67 | } 68 | 69 | return $result; 70 | } 71 | 72 | return null; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/ConfigElement/Value/DimensionUnitFieldText.php: -------------------------------------------------------------------------------- 1 | formatNumber = ($config->formatNumber ?? null); 26 | $this->precision = ($config->precision ?? null); 27 | } 28 | 29 | public function getLabeledValue($object) 30 | { 31 | $labeledValue = parent::getLabeledValue($object); 32 | 33 | if ($labeledValue === null) { 34 | return null; 35 | } 36 | 37 | if ($this->precision) { 38 | $labeledValue->value = round($labeledValue->value, $this->precision); 39 | } 40 | 41 | if ($this->formatNumber) { 42 | $formatter = \Pimcore::getContainer()->get(\Pimcore\Localization\IntlFormatter::class); 43 | 44 | if (!$labeledValue->empty) { 45 | //TODO consider precision 46 | $labeledValue->value = $formatter->formatNumber((float)$labeledValue->value); 47 | } 48 | } 49 | 50 | return $labeledValue; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ConfigElement/Value/StructuredTable.php: -------------------------------------------------------------------------------- 1 | wholeTable = $config->wholeTable; 28 | $this->row = $config->row; 29 | $this->col = $config->col; 30 | } 31 | 32 | public function getLabeledValue($object) 33 | { 34 | if ($this->wholeTable) { 35 | return parent::getLabeledValue($object); 36 | } elseif (!empty($this->row) && !empty($this->col)) { 37 | $wholeResult = parent::getLabeledValue($object); 38 | 39 | $label = $wholeResult->label; 40 | $value = null; 41 | 42 | if (!empty($wholeResult->value)) { 43 | $getter = 'get' . ucfirst($this->row . '__' . $this->col); 44 | $value = $wholeResult->value->$getter(); 45 | } 46 | 47 | $result = new \stdClass(); 48 | $result->label = $label; 49 | 50 | if (is_numeric($value)) { 51 | $formatter = \Pimcore::getContainer()->get(\Pimcore\Localization\IntlFormatter::class); 52 | $value = $formatter->formatNumber($value); 53 | } 54 | 55 | $result->value = $value; 56 | $result->def = $wholeResult->def ?? null; 57 | 58 | if (empty($result->value)) { 59 | $result->empty = true; 60 | } else { 61 | $result->empty = false; 62 | } 63 | 64 | return $result; 65 | } else { 66 | throw new \Exception('Invalid Configuration of StructuredTable ConfigElement'); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Constant/ColumnConfigDisplayMode.php: -------------------------------------------------------------------------------- 1 | getRootNode(); 27 | 28 | $rootNode 29 | ->children() 30 | ->arrayNode('classification_store') 31 | ->children() 32 | ->enumNode('display_mode') 33 | ->info('possible values are [all, object, relevant, none]') 34 | ->values([ 35 | 'all', // always show all keys 36 | 'object', // only show keys which are in any assigned group 37 | 'relevant', // use 'object' mode if any group is assigned, else show all keys 38 | 'none' // do not show classification store keys 39 | ]) 40 | ->defaultValue('relevant') 41 | ->end() 42 | ->booleanNode('grouped')->defaultFalse()->end() 43 | ->end() 44 | ->end() 45 | ->arrayNode('tab_options') 46 | ->children() 47 | ->booleanNode('order_by_name')->defaultFalse()->end() 48 | ->arrayNode('default_classes') 49 | ->info('list of class names or ids') 50 | ->scalarPrototype()->end() 51 | ->end() 52 | ->end() 53 | ->end() 54 | ->end() 55 | ->end(); 56 | 57 | return $treeBuilder; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/DependencyInjection/OutputDataConfigToolkitExtension.php: -------------------------------------------------------------------------------- 1 | load('services.yml'); 35 | 36 | $configuration = new Configuration(); 37 | $config = $this->processConfiguration($configuration, $configs); 38 | 39 | $displayMode = $config['classification_store']['display_mode']; 40 | $grouped = $config['classification_store']['grouped']; 41 | $defaultGrid = $config['tab_options']['default_classes']; 42 | $orderByName = $config['tab_options']['order_by_name']; 43 | 44 | $container 45 | ->getDefinition(ClassController::class) 46 | ->addMethodCall('setClassificationDisplayMode', [$displayMode]) 47 | ->addMethodCall('setClassificationGroupedDisplay', [$grouped]); 48 | 49 | $container 50 | ->getDefinition(AdminController::class) 51 | ->addMethodCall('setDefaultGridClasses', [$defaultGrid]) 52 | ->addMethodCall('setOrderByName', [$orderByName]); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Event/GroupClassificationStoreEvent.php: -------------------------------------------------------------------------------- 1 | targetObject = $targetObject; 35 | } 36 | 37 | public function getTargetObject(): ?DataObject\AbstractObject 38 | { 39 | return $this->targetObject; 40 | } 41 | 42 | public function setDestinationObject(DataObject\AbstractObject $destinationObject): void 43 | { 44 | $this->destinationObject = $destinationObject; 45 | } 46 | 47 | public function getDestinationObject(): DataObject\AbstractObject 48 | { 49 | return $this->destinationObject; 50 | } 51 | 52 | public function setClassificationstoreDefinition( 53 | DataObject\ClassDefinition\Data\Classificationstore $classificationstoreDefinition 54 | ): void { 55 | $this->classificationstoreDefinition = $classificationstoreDefinition; 56 | } 57 | 58 | public function getClassificationstoreDefinition(): DataObject\ClassDefinition\Data\Classificationstore 59 | { 60 | return $this->classificationstoreDefinition; 61 | } 62 | 63 | public function getActiveGroups(): array 64 | { 65 | return $this->activeGroups; 66 | } 67 | 68 | public function setActiveGroups(array $activeGroups): void 69 | { 70 | $this->activeGroups = $activeGroups; 71 | } 72 | 73 | public function setStoreId(int $storeId): void 74 | { 75 | $this->storeId = $storeId; 76 | } 77 | 78 | public function getStoreId(): int 79 | { 80 | return $this->storeId; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/Event/InitializeEvent.php: -------------------------------------------------------------------------------- 1 | object = $object; 41 | $this->hideConfigTab = false; 42 | } 43 | 44 | /** 45 | * @return AbstractObject 46 | */ 47 | public function getObject(): AbstractObject 48 | { 49 | return $this->object; 50 | } 51 | 52 | /** 53 | * @param AbstractObject $object 54 | * 55 | * @return $this 56 | */ 57 | public function setObject(AbstractObject $object): static 58 | { 59 | $this->object = $object; 60 | 61 | return $this; 62 | } 63 | 64 | /** 65 | * @return bool 66 | */ 67 | public function getHideConfigTab(): bool 68 | { 69 | return $this->hideConfigTab; 70 | } 71 | 72 | /** 73 | * @param bool $hideConfigTab 74 | * 75 | * @return $this 76 | */ 77 | public function setHideConfigTab(bool $hideConfigTab): static 78 | { 79 | $this->hideConfigTab = $hideConfigTab; 80 | 81 | return $this; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/Event/OutputDataConfigToolkitEvents.php: -------------------------------------------------------------------------------- 1 | config = $config; 30 | } 31 | 32 | /** 33 | * @return bool 34 | */ 35 | public function doSortAttributes(): bool 36 | { 37 | return $this->sortAttributes; 38 | } 39 | 40 | /** 41 | * @param bool $sortAttributes 42 | * 43 | * @return $this 44 | */ 45 | public function setSortAttributes(bool $sortAttributes): static 46 | { 47 | $this->sortAttributes = $sortAttributes; 48 | 49 | return $this; 50 | } 51 | 52 | public function getConfig(): OutputDefinition 53 | { 54 | return $this->config; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Migrations/Version20221130082116.php: -------------------------------------------------------------------------------- 1 | getTable('bundle_outputdataconfigtoolkit_outputdefinition'); 33 | 34 | if ($table->hasColumn('o_classId')) { 35 | $query = 'ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` varchar(50) NOT NULL'; 36 | $this->addSql(sprintf($query, $table->getName(), 'o_classId', 'classId')); 37 | } 38 | 39 | if ($table->hasColumn('o_id')) { 40 | $query = 'ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` int(11) NOT NULL'; 41 | $this->addSql(sprintf($query, $table->getName(), 'o_id', 'objectId')); 42 | } 43 | } 44 | 45 | public function down(Schema $schema): void 46 | { 47 | $table = $schema->getTable('bundle_outputdataconfigtoolkit_outputdefinition'); 48 | 49 | if ($table->hasColumn('classId')) { 50 | $query = 'ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` varchar(50) NOT NULL'; 51 | $this->addSql(sprintf($query, $table->getName(), 'classId', 'o_classId')); 52 | } 53 | 54 | if ($table->hasColumn('objectId')) { 55 | $query = 'ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` int(11) NOT NULL'; 56 | $this->addSql(sprintf($query, $table->getName(), 'objectId', 'o_id')); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Migrations/Version20240823111615.php: -------------------------------------------------------------------------------- 1 | addSql($query); 33 | } 34 | 35 | public function down(Schema $schema): void 36 | { 37 | $query = "ALTER TABLE `bundle_outputdataconfigtoolkit_outputdefinition` CHANGE COLUMN `configuration` `configuration` LONGTEXT 38 | CHARACTER SET 'latin1' NULL DEFAULT NULL;"; 39 | 40 | $this->addSql($query); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/OutputDataConfigToolkitBundle.php: -------------------------------------------------------------------------------- 1 | getDao()->getByObjectIdClassIdChannel($objectId, $classId, $channel); 49 | RuntimeCache::set($cacheKey, $config); 50 | } catch (\Exception $e) { 51 | Logger::info($e->getMessage()); 52 | $config = null; 53 | } 54 | } catch (\Exception $ex) { 55 | Logger::debug($ex->getMessage()); 56 | 57 | return null; 58 | } 59 | } 60 | 61 | return $config; 62 | } 63 | 64 | public static function getById($id) 65 | { 66 | try { 67 | $config = new self(); 68 | $config->getDao()->getById($id); 69 | 70 | return $config; 71 | } catch (\Exception $ex) { 72 | Logger::debug($ex->getMessage()); 73 | 74 | return null; 75 | } 76 | } 77 | 78 | private static function getCacheKey($objectId, $classId, $channel) 79 | { 80 | return Dao::TABLE_NAME . '_' . $objectId . '_' . $classId . '_' . $channel; 81 | } 82 | 83 | /** 84 | * @param array $values 85 | * 86 | * @return OutputDefinition 87 | */ 88 | public static function create($values = []) 89 | { 90 | $config = new self(); 91 | $config->setValues($values); 92 | 93 | return $config; 94 | } 95 | 96 | /** 97 | * @return void 98 | */ 99 | public function save() 100 | { 101 | $this->getDao()->save(); 102 | } 103 | 104 | /** 105 | * @return void 106 | */ 107 | public function delete() 108 | { 109 | $cacheKey = self::getCacheKey($this->getObjectId(), $this->getClassId(), $this->getChannel()); 110 | RuntimeCache::set($cacheKey, null); 111 | 112 | $this->getDao()->delete(); 113 | } 114 | 115 | public function setChannel($channel) 116 | { 117 | $this->channel = $channel; 118 | } 119 | 120 | public function getChannel() 121 | { 122 | return $this->channel; 123 | } 124 | 125 | public function setConfiguration($configuration) 126 | { 127 | $this->configuration = $configuration; 128 | } 129 | 130 | public function getConfiguration() 131 | { 132 | return $this->configuration; 133 | } 134 | 135 | public function setClassId($classId) 136 | { 137 | $this->classId = $classId; 138 | } 139 | 140 | public function getClassId() 141 | { 142 | return $this->classId; 143 | } 144 | 145 | public function setObjectId($id) 146 | { 147 | $this->objectId = $id; 148 | } 149 | 150 | public function getObjectId() 151 | { 152 | return $this->objectId; 153 | } 154 | 155 | public function setId($id) 156 | { 157 | $this->id = $id; 158 | } 159 | 160 | public function getId() 161 | { 162 | return $this->id; 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /src/OutputDefinition/Dao.php: -------------------------------------------------------------------------------- 1 | validColumns = $this->getValidTableColumns(self::TABLE_NAME); 40 | } 41 | 42 | /** 43 | * @return void 44 | * 45 | * @throws \Exception 46 | */ 47 | public function getByObjectIdClassIdChannel($id, $classId, $channel) 48 | { 49 | $outputDefinitionRaw = $this->db->fetchAssociative('SELECT * FROM ' . self::TABLE_NAME . ' WHERE objectId=? AND classId = ? AND ' . $this->db->quoteIdentifier('channel') . ' = ?', [$id, $classId, $channel]); 50 | if (empty($outputDefinitionRaw)) { 51 | throw new \Exception('OutputDefinition ' . $id . ' - ' . $classId . ' - ' . $channel . ' not found.'); 52 | } 53 | $this->assignVariablesToModel($outputDefinitionRaw); 54 | } 55 | 56 | /** 57 | * @return void 58 | * 59 | * @throws \Exception 60 | */ 61 | public function getById($id) 62 | { 63 | $outputDefinitionRaw = $this->db->fetchAssociative('SELECT * FROM ' . self::TABLE_NAME . ' WHERE id=?', [$id]); 64 | if (empty($outputDefinitionRaw)) { 65 | throw new \Exception('OutputDefinition-Id ' . $id . ' not found.'); 66 | } 67 | $this->assignVariablesToModel($outputDefinitionRaw); 68 | } 69 | 70 | /** 71 | * Create a new record for the object in database 72 | * 73 | * @return void 74 | */ 75 | public function create() 76 | { 77 | $class = get_object_vars($this->model); 78 | $data = []; 79 | 80 | foreach ($class as $key => $value) { 81 | if (in_array($key, $this->validColumns)) { 82 | if (is_array($value) || is_object($value)) { 83 | $value = serialize($value); 84 | } elseif (is_bool($value)) { 85 | $value = (int)$value; 86 | } 87 | $data[$key] = $value; 88 | } 89 | } 90 | $this->db->insert(self::TABLE_NAME, self::quoteDataIdentifiers($this->db, $data)); 91 | $this->model->setId($this->db->lastInsertId()); 92 | } 93 | 94 | /** 95 | * Save object to database 96 | * 97 | * @return void 98 | */ 99 | public function save() 100 | { 101 | $other = OutputDefinition::getByObjectIdClassIdChannel($this->model->getObjectId(), $this->model->getClassId(), $this->model->getChannel()); 102 | if ($other) { 103 | $this->model->setId($other->getId()); 104 | } 105 | 106 | if ($this->model->getId()) { 107 | $this->update(); 108 | } else { 109 | $this->create(); 110 | } 111 | } 112 | 113 | /** 114 | * @return void 115 | */ 116 | public function update() 117 | { 118 | $class = get_object_vars($this->model); 119 | $data = []; 120 | 121 | foreach ($class as $key => $value) { 122 | if (in_array($key, $this->validColumns)) { 123 | if (is_array($value) || is_object($value)) { 124 | $value = serialize($value); 125 | } elseif (is_bool($value)) { 126 | $value = (int)$value; 127 | } 128 | $data[$key] = $value; 129 | } 130 | } 131 | $this->db->update(self::TABLE_NAME, self::quoteDataIdentifiers($this->db, $data), ['id' => $this->model->getId()]); 132 | } 133 | 134 | /** 135 | * Deletes object from database 136 | * 137 | * @return void 138 | */ 139 | public function delete() 140 | { 141 | $this->db->delete(self::TABLE_NAME, ['id' => (int) $this->model->getId()]); 142 | } 143 | 144 | public static function quoteDataIdentifiers(Connection $db, array $data): array 145 | { 146 | $newData = []; 147 | foreach ($data as $key => $value) { 148 | $newData[$db->quoteIdentifier($key)] = $value; 149 | } 150 | 151 | return $newData; 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /src/OutputDefinition/Listing.php: -------------------------------------------------------------------------------- 1 | outputDefinitions)) { 49 | $this->load(); 50 | } 51 | 52 | return $this->outputDefinitions; 53 | } 54 | 55 | /** 56 | * @param array $outputDefinitions 57 | * 58 | * @return void 59 | */ 60 | public function setOutputDefinitions($outputDefinitions) 61 | { 62 | $this->outputDefinitions = $outputDefinitions; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/OutputDefinition/Listing/Dao.php: -------------------------------------------------------------------------------- 1 | model->getConditionParams() ?: [], 'value'); 35 | 36 | $unitIds = $this->db->fetchAllAssociative( 37 | 'SELECT objectId, id, classId, ' . $this->db->quoteIdentifier('channel') . ' FROM ' . OutputDefinition\Dao::TABLE_NAME . 38 | $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), 39 | $params 40 | ); 41 | 42 | foreach ($unitIds as $row) { 43 | $configs[] = OutputDefinition::getByObjectIdClassIdChannel($row['objectId'], $row['classId'], $row['channel']); 44 | } 45 | 46 | $this->model->setOutputDefinitions($configs); 47 | 48 | return $configs; 49 | } 50 | 51 | public function getTotalCount(): int 52 | { 53 | $params = array_column($this->model->getConditionParams() ?: [], 'value'); 54 | $amount = $this->db->fetchAssociative('SELECT COUNT(*) as amount FROM `' . OutputDefinition\Dao::TABLE_NAME . '`' . $this->getCondition(), $params); 55 | 56 | return (int)$amount['amount']; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Resources/config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | connection: default 3 | migrations_paths: 4 | 'OutputDataConfigToolkitBundle\Migrations': '@OutputDataConfigToolkitBundle/Migrations' 5 | -------------------------------------------------------------------------------- /src/Resources/config/pimcore/config.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: ../packages/doctrine_migrations.yaml } 3 | 4 | output_data_config_toolkit: 5 | 6 | # possible values are [all, object, relevant, none] 7 | classification_store: 8 | display_mode: none 9 | 10 | # list of class names or ids 11 | tab_options: 12 | default_classes: 13 | -------------------------------------------------------------------------------- /src/Resources/config/pimcore/routing.yml: -------------------------------------------------------------------------------- 1 | _pimcore_outputdataconfig_backend: 2 | resource: "@OutputDataConfigToolkitBundle/Controller/" 3 | type: attribute 4 | prefix: /admin/outputdataconfig 5 | -------------------------------------------------------------------------------- /src/Resources/config/services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: true 6 | 7 | OutputDataConfigToolkitBundle\Controller\ClassController: 8 | OutputDataConfigToolkitBundle\Controller\AdminController: 9 | -------------------------------------------------------------------------------- /src/Resources/public/css/admin.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | .pimcore_icon_operator_group { 13 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/multiple_inputs.svg") center center no-repeat !important; 14 | } 15 | .pimcore_icon_operator_concatenator { 16 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/capacitor.svg") center center no-repeat !important; 17 | } 18 | 19 | .bundle_outputdataconfig_icon { 20 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/grid.svg") center center no-repeat !important; 21 | } 22 | 23 | .bundle_outputdataconfig_icon_material { 24 | background: url("/bundles/outputdataconfigtoolkit/img/outline-chrome_reader_mode-24px.svg") center center no-repeat; 25 | } 26 | 27 | .bundle_outputdataconfig_icon:before { 28 | position: absolute; 29 | width: 12px; 30 | height: 12px; 31 | bottom: 0px; 32 | right: 0px; 33 | content: ""; 34 | background: url(/bundles/pimcoreadmin/img/flat-color-icons/go.svg) center center no-repeat !important; 35 | } 36 | 37 | 38 | 39 | 40 | .pimcore_icon_operator_text { 41 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/text.svg") center center no-repeat !important; 42 | } 43 | 44 | .pimcore_icon_operator_table { 45 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/data_sheet.svg") center center no-repeat !important; 46 | } 47 | 48 | .pimcore_icon_operator_tablerow { 49 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/table-row.svg") center center no-repeat !important; 50 | } 51 | 52 | .pimcore_icon_operator_tablecol { 53 | background: url("/bundles/pimcoreadmin/img/flat-color-icons/table-column.svg") center center no-repeat !important; 54 | } 55 | 56 | .pimcore_icon_operator_cell_formater { 57 | background: url("/bundles/pimcoreadmin/img/icon/style_edit.png") no-repeat scroll left center transparent !important; 58 | } 59 | 60 | .pimcore_icon_operator_textaddon { 61 | background: url("/bundles/pimcoreadmin/img/icon/font_add.png") no-repeat scroll left center transparent !important; 62 | } 63 | -------------------------------------------------------------------------------- /src/Resources/public/img/outline-chrome_reader_mode-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Resources/public/js/Bundle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.Bundle"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.Bundle = Class.create({ 15 | 16 | getClassName: function () { 17 | return "pimcore.bundle.outputDataConfigToolkit.Bundle"; 18 | }, 19 | 20 | initialize: function() { 21 | document.addEventListener(pimcore.events.postOpenObject, this.onPostOpenObject.bind(this)); 22 | }, 23 | 24 | 25 | uninstall: function() { 26 | 27 | }, 28 | 29 | onPostOpenObject: function (e) { 30 | let object = e.detail.object; 31 | let type = e.detail.type; 32 | 33 | if (pimcore.globalmanager.get("user").isAllowed("bundle_outputDataConfigToolkit")) { 34 | Ext.Ajax.request({ 35 | url: "/admin/outputdataconfig/admin/initialize", 36 | params: { 37 | id: object.id 38 | } 39 | }) 40 | .then(function (res) { 41 | var data = JSON.parse(res.responseText); 42 | 43 | if (!data.success || data.object === false) { 44 | return; 45 | } 46 | 47 | var objectData = object; 48 | if (data.object.id) { 49 | objectData = data.object; 50 | } 51 | 52 | var configTab = new pimcore.bundle.outputDataConfigToolkit.Tab(objectData, type); 53 | var objectTabPanel = object.tab.items.items[1]; 54 | 55 | objectTabPanel.insert(objectTabPanel.items.length, configTab.getLayout()); 56 | pimcore.layout.refresh(); 57 | 58 | }.bind(this)); 59 | } 60 | } 61 | }); 62 | 63 | var outputDataConfigToolkitPlugin = new pimcore.bundle.outputDataConfigToolkit.Bundle(); 64 | -------------------------------------------------------------------------------- /src/Resources/public/js/OutputDataConfigTab.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.Tab"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.Tab = Class.create({ 15 | 16 | initialize: function(object, type) { 17 | this.object = object; 18 | this.type = type; 19 | }, 20 | 21 | load: function () { 22 | }, 23 | 24 | getLayout: function () { 25 | if (this.layout == null) { 26 | var classStore = pimcore.globalmanager.get("object_types_store"); 27 | var toolbarConfig = [new Ext.Toolbar.TextItem({ 28 | text: t("please_select_a_type") 29 | }),new Ext.form.ComboBox({ 30 | name: "selectClass", 31 | store: classStore, 32 | valueField: 'id', 33 | displayField: 'translatedText', 34 | triggerAction: 'all', 35 | listeners: { 36 | "select": function(field, newValue, oldValue) { 37 | this.store.load({params: {"class_id": newValue.data.id}}); 38 | }.bind(this) 39 | } 40 | }),{ 41 | xtype: 'button', 42 | text: t('reload'), 43 | handler: function () { 44 | this.store.reload(); 45 | }.bind(this), 46 | iconCls: "pimcore_icon_reload" 47 | }]; 48 | 49 | 50 | this.layout = new Ext.Panel({ 51 | border: false, 52 | layout: "fit", 53 | iconCls: "bundle_outputdataconfig_icon_material pimcore_material_icon", 54 | tbar: toolbarConfig, 55 | tooltip: t("outputdataconfig"), 56 | listeners: { 57 | afterrender: function(){ 58 | this.layout.insert(this.layout.items.length, this.getGrid()); 59 | }.bind(this) 60 | } 61 | }); 62 | } 63 | return this.layout; 64 | 65 | }, 66 | 67 | getGrid: function() { 68 | 69 | var itemsPerPage = 100000000; 70 | this.store = pimcore.helpers.grid.buildDefaultStore( 71 | '/admin/outputdataconfig/admin/get-output-configs?', 72 | [ 73 | {name: 'id'}, 74 | {name: 'classname'}, 75 | {name: 'object_id'}, 76 | {name: 'channel', type: 'string'}, 77 | {name: 'is_inherited'} 78 | ], 79 | itemsPerPage 80 | ); 81 | var proxy = this.store.getProxy(); 82 | proxy.extraParams.object_id = this.object.id; 83 | this.store.setGroupField('classname'); 84 | this.store.setGroupDir('ASC'); 85 | 86 | var columns = [ 87 | {header: t('class'), flex: 20, dataIndex: 'classname', sortable: false}, 88 | {header: t('channel'), flex: 30, dataIndex: 'channel', sortable: false}, 89 | {header: t('objectid'), flex: 10, dataIndex: 'object_id', sortable: false, renderer: function (value, metaData, record) { 90 | if(record.data.is_inherited == true) { 91 | metaData.css += " grid_value_inherited"; 92 | } 93 | return value;} 94 | } 95 | ]; 96 | 97 | columns.push({ 98 | header: t('overwrite/edit'), 99 | xtype: 'actioncolumn', 100 | width: 60, 101 | items: [ 102 | { 103 | tooltip: t('overwrite/edit'), 104 | icon: "/bundles/pimcoreadmin/img/flat-color-icons/edit.svg", 105 | handler: function (grid, rowIndex, colIndex, item, e, record, row) { 106 | this.openConfigDialog(record.id); 107 | }.bind(this) 108 | } 109 | ] 110 | }); 111 | columns.push({ 112 | header: t('reset'), 113 | xtype: 'actioncolumn', 114 | width: 60, 115 | items: [ 116 | { 117 | tooltip: t('reset'), 118 | icon: "/bundles/pimcoreadmin/img/flat-color-icons/delete.svg", 119 | getClass: function(v, meta, rec) { // Or return a class from a function 120 | if(rec.get('is_inherited') || this.object.id == 1) { 121 | return "pimcore_hidden"; 122 | } 123 | }.bind(this), 124 | handler: function (grid, rowIndex, colIndex, item, event, record) { 125 | Ext.MessageBox.confirm(t('reset_outputdataconfig'), t('reset_outputdataconfig_text'), this.resetOutputDataConfig.bind(this, record.data.id), this); 126 | }.bind(this) 127 | } 128 | ] 129 | }); 130 | 131 | 132 | this.configGrid = Ext.create('Ext.grid.Panel', { 133 | frame: false, 134 | autoScroll: true, 135 | store: this.store, 136 | columns : columns, 137 | trackMouseOver: true, 138 | columnLines: true, 139 | bodyCls: "pimcore_editable_grid", 140 | selModel: Ext.create('Ext.selection.RowModel', {}), 141 | stripeRows: true, 142 | features: [{ 143 | id: 'group', 144 | ftype: 'grouping', 145 | groupHeaderTpl: '{name}', 146 | hideGroupedHeader: true, 147 | enableGroupingMenu: false, 148 | enableNoGroups:false, 149 | startCollapsed: true 150 | }], 151 | viewConfig: { 152 | forceFit: true 153 | } 154 | }); 155 | 156 | return this.configGrid; 157 | }, 158 | 159 | resetOutputDataConfig: function(configId, answer) { 160 | if(answer != "no") { 161 | Ext.Ajax.request({ 162 | url: '/admin/outputdataconfig/admin/reset-output-config', 163 | params: { 164 | config_id: configId 165 | }, 166 | success: function(response) { 167 | var data = Ext.decode(response.responseText); 168 | 169 | if(data.success) { 170 | this.store.reload(); 171 | } else { 172 | pimcore.helpers.showNotification(t("error"), t("error_reseting_output_config"), "error", t(data.message)); 173 | } 174 | }.bind(this) 175 | }); 176 | } 177 | }, 178 | 179 | openConfigDialog: function(configId) { 180 | Ext.Ajax.request({ 181 | url: '/admin/outputdataconfig/admin/get-output-config', 182 | params: { 183 | config_id: configId 184 | }, 185 | success: function(response) { 186 | var data = Ext.decode(response.responseText); 187 | 188 | if(data.success) { 189 | var dialog = new pimcore.bundle.outputDataConfigToolkit.OutputDataConfigDialog(data.outputConfig, this.saveConfigDialog.bind(this), null, this.object.id); 190 | } else { 191 | pimcore.helpers.showNotification(t("error"), t("error_opening_output_config"), "error", t(data.message)); 192 | } 193 | }.bind(this) 194 | }); 195 | 196 | }, 197 | 198 | saveConfigDialog: function(data) { 199 | Ext.Ajax.request({ 200 | url: '/admin/outputdataconfig/admin/save-output-config', 201 | method: 'POST', 202 | params: { 203 | config_id: data.id, 204 | object_id: this.object.id, 205 | config: Ext.encode(data.config) 206 | }, 207 | success: function(response) { 208 | var data = Ext.decode(response.responseText); 209 | 210 | if(data.success) { 211 | pimcore.helpers.showNotification(t("success"), t("output_config_saved"), "success"); 212 | this.store.reload(); 213 | } else { 214 | pimcore.helpers.showNotification(t("error"), t("error_saving_output_config"), "error", t(data.message)); 215 | } 216 | }.bind(this) 217 | }); 218 | } 219 | 220 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/Abstract.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract = Class.create({ 15 | type: null, 16 | class: null, 17 | objectClassId: null, 18 | allowedTypes: null, 19 | allowedParents: null, 20 | maxChildCount: null, 21 | 22 | initialize: function(classId) { 23 | this.objectClassId = classId; 24 | }, 25 | 26 | getConfigTreeNode: function(configAttributes) { 27 | return {}; 28 | }, 29 | 30 | 31 | getCopyNode: function(source) { 32 | var copy = new Ext.tree.TreeNode({ 33 | text: source.data.text, 34 | isTarget: true, 35 | leaf: true, 36 | configAttributes: { 37 | label: null, 38 | type: this.type, 39 | class: this.class 40 | } 41 | }); 42 | return copy; 43 | }, 44 | 45 | 46 | getConfigDialog: function(node) { 47 | }, 48 | 49 | commitData: function() { 50 | this.window.close(); 51 | } 52 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/CellFormater.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.CellFormater"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.CellFormater = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | type: "operator", 16 | class: "CellFormater", 17 | iconCls: "pimcore_icon_operator_cell_formater", 18 | defaultText: "operator_cell_formater", 19 | 20 | 21 | getConfigTreeNode: function(configAttributes) { 22 | if(configAttributes) { 23 | var node = { 24 | draggable: true, 25 | iconCls: this.iconCls, 26 | text: configAttributes.label, 27 | configAttributes: configAttributes, 28 | isTarget: true, 29 | maxChildCount: 1, 30 | expanded: true, 31 | leaf: false, 32 | expandable: false 33 | }; 34 | } else { 35 | 36 | //For building up operator list 37 | var configAttributes = { type: this.type, class: this.class}; 38 | 39 | var node = { 40 | draggable: true, 41 | iconCls: this.iconCls, 42 | text: t(this.defaultText), 43 | configAttributes: configAttributes, 44 | isTarget: true, 45 | maxChildCount: 1, 46 | leaf: true 47 | }; 48 | } 49 | return node; 50 | }, 51 | 52 | 53 | getCopyNode: function(source) { 54 | var copy = source.createNode({ 55 | iconCls: this.iconCls, 56 | text: source.data.cssClass, 57 | isTarget: true, 58 | leaf: false, 59 | maxChildCount: 1, 60 | expanded: true, 61 | configAttributes: { 62 | label: null, 63 | type: this.type, 64 | class: this.class 65 | } 66 | }); 67 | return copy; 68 | }, 69 | 70 | 71 | getConfigDialog: function(node) { 72 | this.node = node; 73 | 74 | this.cssClass = new Ext.form.TextField({ 75 | fieldLabel: t('operator_cell_formater_css_class'), 76 | length: 255, 77 | width: 200, 78 | value: this.node.data.configAttributes.cssClass 79 | }); 80 | 81 | this.styles = new Ext.form.TextArea({ 82 | fieldLabel: t('operator_cell_formater_css_styles'), 83 | length: 255, 84 | width: 200, 85 | height: 100, 86 | value: this.node.data.configAttributes.styles 87 | }); 88 | 89 | this.labelStyles = new Ext.form.TextArea({ 90 | fieldLabel: t('operator_cell_formater_css_label_styles'), 91 | length: 255, 92 | width: 200, 93 | height: 100, 94 | value: this.node.data.configAttributes.labelStyles 95 | }); 96 | 97 | 98 | this.configPanel = new Ext.Panel({ 99 | layout: "form", 100 | bodyStyle: "padding: 10px;", 101 | items: [this.cssClass, this.styles, this.labelStyles], 102 | buttons: [{ 103 | text: t("apply"), 104 | iconCls: "pimcore_icon_apply", 105 | handler: function () { 106 | this.commitData(); 107 | }.bind(this) 108 | }] 109 | }); 110 | 111 | this.window = new Ext.Window({ 112 | width: 400, 113 | height: 350, 114 | modal: true, 115 | title: t('operator_cell_formater_settings'), 116 | layout: "fit", 117 | items: [this.configPanel] 118 | }); 119 | 120 | this.window.show(); 121 | }, 122 | 123 | commitData: function() { 124 | this.node.data.configAttributes.cssClass = this.cssClass.getValue(); 125 | this.node.data.configAttributes.styles = this.styles.getValue(); 126 | this.node.data.configAttributes.labelStyles = this.labelStyles.getValue(); 127 | this.node.data.configAttributes.label = this.cssClass.getValue(); 128 | this.node.set('text', this.cssClass.getValue()); 129 | this.window.close(); 130 | } 131 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/Concatenator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Concatenator"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Concatenator = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Text, { 15 | type: "operator", 16 | class: "Concatenator", 17 | iconCls: "pimcore_icon_operator_concatenator", 18 | defaultText: "operator_concatenator", 19 | 20 | getConfigTreeNode: function(configAttributes) { 21 | if(configAttributes) { 22 | var node = { 23 | draggable: true, 24 | iconCls: this.iconCls, 25 | text: configAttributes.label, 26 | configAttributes: configAttributes, 27 | isTarget: true, 28 | allowChildren: true, 29 | expanded: true, 30 | leaf: false, 31 | expandable: false 32 | }; 33 | } else { 34 | 35 | //For building up operator list 36 | var configAttributes = { type: this.type, class: this.class}; 37 | 38 | var node = { 39 | draggable: true, 40 | iconCls: this.iconCls, 41 | text: t(this.defaultText), 42 | configAttributes: configAttributes, 43 | isTarget: true, 44 | leaf: true 45 | }; 46 | } 47 | return node; 48 | }, 49 | 50 | 51 | getCopyNode: function(source) { 52 | var copy = source.createNode({ 53 | iconCls: this.iconCls, 54 | text: source.data.text, 55 | isTarget: true, 56 | leaf: false, 57 | expandable: false, 58 | configAttributes: { 59 | label: source.data.text, 60 | type: this.type, 61 | class: this.class 62 | } 63 | }); 64 | return copy; 65 | }, 66 | 67 | 68 | getConfigDialog: function(node) { 69 | this.node = node; 70 | 71 | this.textfield = new Ext.form.TextField({ 72 | fieldLabel: t('label'), 73 | length: 255, 74 | width: 200, 75 | value: this.node.data.configAttributes.label 76 | }); 77 | 78 | this.glue = new Ext.form.TextField({ 79 | fieldLabel: t('glue'), 80 | length: 255, 81 | width: 200, 82 | value: this.node.data.configAttributes.glue 83 | }); 84 | this.forceValue = new Ext.form.Checkbox({ 85 | fieldLabel: t('force_value'), 86 | length: 255, 87 | width: 200, 88 | checked: this.node.data.configAttributes.forceValue 89 | }); 90 | this.formatNumbers = new Ext.form.Checkbox({ 91 | fieldLabel: t('format_numbers'), 92 | length: 255, 93 | width: 200, 94 | checked: this.node.data.configAttributes.formatNumbers 95 | }); 96 | 97 | this.configPanel = new Ext.Panel({ 98 | layout: "form", 99 | bodyStyle: "padding: 10px;", 100 | items: [this.textfield, this.glue, this.forceValue, this.formatNumbers], 101 | buttons: [{ 102 | text: t("apply"), 103 | iconCls: "pimcore_icon_apply", 104 | handler: function () { 105 | this.commitData(); 106 | }.bind(this) 107 | }] 108 | }); 109 | 110 | this.window = new Ext.Window({ 111 | width: 400, 112 | height: 200, 113 | modal: true, 114 | title: t('concatenator_operator_settings'), 115 | layout: "fit", 116 | items: [this.configPanel] 117 | }); 118 | 119 | this.window.show(); 120 | return this.window; 121 | }, 122 | 123 | commitData: function() { 124 | this.node.data.configAttributes.label = this.textfield.getValue(); 125 | this.node.set('text', this.textfield.getValue()); 126 | this.node.data.configAttributes.glue = this.glue.getValue(); 127 | this.node.data.configAttributes.forceValue = this.forceValue.getValue(); 128 | this.node.data.configAttributes.formatNumbers = this.formatNumbers.getValue(); 129 | this.window.close(); 130 | } 131 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/Group.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Group"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Group = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Text, { 15 | type: "operator", 16 | class: "Group", 17 | iconCls: "pimcore_icon_operator_group", 18 | defaultText: "operator_group", 19 | windowTitle: "group_operator_settings", 20 | 21 | getConfigTreeNode: function(configAttributes) { 22 | if(configAttributes) { 23 | var node = { 24 | draggable: true, 25 | iconCls: this.iconCls, 26 | text: configAttributes.label, 27 | configAttributes: configAttributes, 28 | isTarget: true, 29 | allowChildren: true, 30 | allowedTypes: this.allowedTypes, 31 | allowedParents: this.allowedParents, 32 | maxChildCount: this.maxChildCount, 33 | expanded: true, 34 | leaf: false, 35 | expandable: false 36 | }; 37 | } else { 38 | 39 | //For building up operator list 40 | var configAttributes = { type: this.type, class: this.class}; 41 | 42 | var node = { 43 | draggable: true, 44 | iconCls: this.iconCls, 45 | text: t(this.defaultText), 46 | allowedParents: this.allowedParents, 47 | allowedTypes: this.allowedTypes, 48 | maxChildCount: this.maxChildCount, 49 | configAttributes: configAttributes, 50 | isTarget: true, 51 | leaf: true 52 | }; 53 | } 54 | return node; 55 | }, 56 | 57 | 58 | getCopyNode: function(source) { 59 | var copy = source.createNode({ 60 | iconCls: this.iconCls, 61 | text: source.data.text, 62 | isTarget: true, 63 | leaf: false, 64 | expandable: false, 65 | allowedTypes: this.allowedTypes, 66 | allowedParents: this.allowedParents, 67 | maxChildCount: this.maxChildCount, 68 | configAttributes: { 69 | label: source.data.text, 70 | type: this.type, 71 | class: this.class 72 | } 73 | }); 74 | return copy; 75 | }, 76 | 77 | 78 | getConfigDialog: function(node) { 79 | this.node = node; 80 | 81 | this.textfield = new Ext.form.TextField({ 82 | fieldLabel: t('text'), 83 | length: 255, 84 | width: 200, 85 | value: this.node.data.configAttributes.label 86 | }); 87 | 88 | this.configPanel = new Ext.Panel({ 89 | layout: "form", 90 | bodyStyle: "padding: 10px;", 91 | items: [this.textfield], 92 | buttons: [{ 93 | text: t("apply"), 94 | iconCls: "pimcore_icon_apply", 95 | handler: function () { 96 | this.commitData(); 97 | }.bind(this) 98 | }] 99 | }); 100 | 101 | this.window = new Ext.Window({ 102 | width: 400, 103 | height: 150, 104 | modal: true, 105 | title: t(this.windowTitle), 106 | layout: "fit", 107 | items: [this.configPanel] 108 | }); 109 | 110 | this.window.show(); 111 | return this.window; 112 | }, 113 | 114 | commitData: function() { 115 | this.node.data.configAttributes.label = this.textfield.getValue(); 116 | this.node.set('text', this.textfield.getValue()); 117 | this.window.close(); 118 | } 119 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/Table.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Table"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Table = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Group, { 15 | type: "operator", 16 | class: "Table", 17 | iconCls: "pimcore_icon_operator_table", 18 | defaultText: "operator_table", 19 | windowTitle: "table_operator_settings", 20 | allowedTypes: { 21 | operator: { 22 | TableRow: true 23 | } 24 | }, 25 | 26 | getConfigDialog: function(node) { 27 | this.node = node; 28 | 29 | this.textfield = new Ext.form.TextField({ 30 | fieldLabel: t('text'), 31 | length: 255, 32 | width: 200, 33 | value: this.node.data.configAttributes.label 34 | }); 35 | 36 | this.tooltip = new Ext.form.TextArea({ 37 | fieldLabel: t('tooltip'), 38 | length: 255, 39 | width: 200, 40 | height: 100, 41 | value: this.node.data.configAttributes.tooltip 42 | }); 43 | 44 | this.configPanel = new Ext.Panel({ 45 | layout: "form", 46 | bodyStyle: "padding: 10px;", 47 | items: [this.textfield, this.tooltip], 48 | buttons: [{ 49 | text: t("apply"), 50 | iconCls: "pimcore_icon_apply", 51 | handler: function () { 52 | this.commitData(); 53 | }.bind(this) 54 | }] 55 | }); 56 | 57 | this.window = new Ext.Window({ 58 | width: 400, 59 | height: 250, 60 | modal: true, 61 | title: t(this.windowTitle), 62 | layout: "fit", 63 | items: [this.configPanel] 64 | }); 65 | 66 | this.window.show(); 67 | return this.window; 68 | }, 69 | 70 | commitData: function() { 71 | this.node.data.configAttributes.label = this.textfield.getValue(); 72 | this.node.data.configAttributes.tooltip = this.tooltip.getValue(); 73 | this.node.set('text', this.textfield.getValue()); 74 | this.window.close(); 75 | } 76 | 77 | 78 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/TableCol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TableCol"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TableCol = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Group, { 15 | type: "operator", 16 | class: "TableCol", 17 | iconCls: "pimcore_icon_operator_tablecol", 18 | defaultText: "operator_tablecol", 19 | windowTitle: "tablecol_operator_settings", 20 | allowedTypes: null, 21 | allowedParents: { 22 | operator: { 23 | TableRow: true 24 | } 25 | }, 26 | maxChildCount: 1, 27 | 28 | 29 | getConfigTreeNode: function(configAttributes) { 30 | if(configAttributes) { 31 | var node = { 32 | draggable: true, 33 | iconCls: this.iconCls, 34 | text: t(this.defaultText) + " (" + configAttributes.colspan + ")", 35 | configAttributes: configAttributes, 36 | isTarget: true, 37 | allowChildren: true, 38 | allowedTypes: this.allowedTypes, 39 | allowedParents: this.allowedParents, 40 | maxChildCount: this.maxChildCount, 41 | expanded: true, 42 | leaf: false, 43 | expandable: false 44 | }; 45 | } else { 46 | 47 | //For building up operator list 48 | var configAttributes = { type: this.type, class: this.class}; 49 | 50 | var node = { 51 | draggable: true, 52 | iconCls: this.iconCls, 53 | text: t(this.defaultText), 54 | configAttributes: configAttributes, 55 | allowedTypes: this.allowedTypes, 56 | allowedParents: this.allowedParents, 57 | maxChildCount: this.maxChildCount, 58 | isTarget: true, 59 | leaf: true 60 | }; 61 | } 62 | return node; 63 | }, 64 | 65 | 66 | getConfigDialog: function(node) { 67 | this.node = node; 68 | 69 | var value = 1; 70 | if(this.node.data.configAttributes.colspan) { 71 | value = this.node.data.configAttributes.colspan; 72 | } 73 | 74 | this.numberfield = new Ext.form.NumberField({ 75 | fieldLabel: t('colspan'), 76 | length: 255, 77 | width: 200, 78 | value: value 79 | }); 80 | 81 | this.headline = new Ext.form.Checkbox({ 82 | fieldLabel: t('headline'), 83 | checked: this.node.data.configAttributes.headline 84 | }); 85 | 86 | this.configPanel = new Ext.Panel({ 87 | layout: "form", 88 | bodyStyle: "padding: 10px;", 89 | items: [this.numberfield, this.headline], 90 | buttons: [{ 91 | text: t("apply"), 92 | iconCls: "pimcore_icon_apply", 93 | handler: function () { 94 | this.commitData(); 95 | }.bind(this) 96 | }] 97 | }); 98 | 99 | this.window = new Ext.Window({ 100 | width: 400, 101 | height: 150, 102 | modal: true, 103 | title: t(this.windowTitle), 104 | layout: "fit", 105 | items: [this.configPanel] 106 | }); 107 | 108 | this.window.show(); 109 | return this.window; 110 | }, 111 | 112 | commitData: function() { 113 | this.node.data.configAttributes.colspan = this.numberfield.getValue(); 114 | this.node.data.configAttributes.headline = this.headline.getValue(); 115 | this.node.set('text', this.node.data.text + " (" + this.numberfield.getValue() + ")" ); 116 | this.window.close(); 117 | } 118 | 119 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/TableRow.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TableRow"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TableRow = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Group, { 15 | type: "operator", 16 | class: "TableRow", 17 | iconCls: "pimcore_icon_operator_tablerow", 18 | defaultText: "operator_tablerow", 19 | windowTitle: "tablerow_operator_settings", 20 | allowedTypes: null, 21 | allowedParents: { 22 | operator: { 23 | Table: true 24 | } 25 | }, 26 | 27 | getConfigDialog: function(node) { 28 | this.node = node; 29 | 30 | 31 | this.headline = new Ext.form.Checkbox({ 32 | fieldLabel: t('headline'), 33 | checked: this.node.data.configAttributes.headline 34 | }); 35 | 36 | this.configPanel = new Ext.Panel({ 37 | layout: "form", 38 | bodyStyle: "padding: 10px;", 39 | items: [this.headline], 40 | buttons: [{ 41 | text: t("apply"), 42 | iconCls: "pimcore_icon_apply", 43 | handler: function () { 44 | this.commitData(); 45 | }.bind(this) 46 | }] 47 | }); 48 | 49 | this.window = new Ext.Window({ 50 | width: 400, 51 | height: 150, 52 | modal: true, 53 | title: t(this.windowTitle), 54 | layout: "fit", 55 | items: [this.configPanel] 56 | }); 57 | 58 | this.window.show(); 59 | return this.window; 60 | }, 61 | 62 | commitData: function() { 63 | this.node.data.configAttributes.headline = this.headline.getValue(); 64 | this.window.close(); 65 | } 66 | 67 | 68 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/Text.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Text"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.Text = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | type: "operator", 16 | class: "Text", 17 | iconCls: "pimcore_icon_operator_text", 18 | defaultText: "operator_text", 19 | 20 | 21 | getConfigTreeNode: function(configAttributes) { 22 | if(configAttributes) { 23 | var node = { 24 | draggable: true, 25 | iconCls: this.iconCls, 26 | text: configAttributes.textValue, 27 | configAttributes: configAttributes, 28 | isTarget: true, 29 | leaf: true 30 | }; 31 | } else { 32 | 33 | //For building up operator list 34 | var configAttributes = { type: this.type, class: this.class}; 35 | 36 | var node = { 37 | draggable: true, 38 | iconCls: this.iconCls, 39 | text: t(this.defaultText), 40 | configAttributes: configAttributes, 41 | isTarget: true, 42 | leaf: true 43 | }; 44 | } 45 | return node; 46 | }, 47 | 48 | 49 | getCopyNode: function(source) { 50 | var copy = source.createNode({ 51 | iconCls: this.iconCls, 52 | text: source.data.text, 53 | isTarget: true, 54 | leaf: true, 55 | configAttributes: { 56 | label: null, 57 | type: this.type, 58 | class: this.class 59 | } 60 | }); 61 | return copy; 62 | }, 63 | 64 | 65 | getConfigDialog: function(node) { 66 | this.node = node; 67 | 68 | this.textfield = new Ext.form.TextField({ 69 | fieldLabel: t('text'), 70 | length: 255, 71 | width: 200, 72 | value: this.node.data.configAttributes.textValue 73 | }); 74 | 75 | this.configPanel = new Ext.Panel({ 76 | layout: "form", 77 | bodyStyle: "padding: 10px;", 78 | items: [this.textfield], 79 | buttons: [{ 80 | text: t("apply"), 81 | iconCls: "pimcore_icon_apply", 82 | handler: function () { 83 | this.commitData(); 84 | }.bind(this) 85 | }] 86 | }); 87 | 88 | this.window = new Ext.Window({ 89 | width: 400, 90 | height: 160, 91 | modal: true, 92 | title: t('text_operator_settings'), 93 | layout: "fit", 94 | items: [this.configPanel] 95 | }); 96 | 97 | this.window.show(); 98 | return this.window; 99 | }, 100 | 101 | commitData: function() { 102 | this.node.data.configAttributes.textValue = this.textfield.getValue(); 103 | this.node.set('text', this.textfield.getValue()); 104 | this.window.close(); 105 | } 106 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/TextAddon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TextAddon"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TextAddon = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | type: "operator", 16 | class: "TextAddon", 17 | iconCls: "pimcore_icon_operator_textaddon", 18 | defaultText: "operator_textaddon", 19 | 20 | 21 | getConfigTreeNode: function(configAttributes) { 22 | if(configAttributes) { 23 | var node = { 24 | draggable: true, 25 | iconCls: this.iconCls, 26 | text: t("operator_textaddon") + (typeof configAttributes.addon != 'undefined' && configAttributes.addon ? ': ' + configAttributes.addon : ''), 27 | configAttributes: configAttributes, 28 | isTarget: true, 29 | maxChildCount: 1, 30 | expanded: true, 31 | leaf: false, 32 | expandable: false 33 | }; 34 | } else { 35 | 36 | //For building up operator list 37 | var configAttributes = { type: this.type, class: this.class}; 38 | 39 | var node = { 40 | draggable: true, 41 | iconCls: this.iconCls, 42 | text: t(this.defaultText), 43 | configAttributes: configAttributes, 44 | isTarget: true, 45 | maxChildCount: 1, 46 | leaf: true 47 | }; 48 | } 49 | return node; 50 | }, 51 | 52 | 53 | getCopyNode: function(source) { 54 | var copy = source.createNode({ 55 | iconCls: this.iconCls, 56 | text: source.data.cssClass, 57 | isTarget: true, 58 | leaf: false, 59 | maxChildCount: 1, 60 | expanded: true, 61 | expandable: false, 62 | configAttributes: { 63 | label: null, 64 | type: this.type, 65 | class: this.class 66 | } 67 | }); 68 | return copy; 69 | }, 70 | 71 | 72 | getConfigDialog: function(node) { 73 | this.node = node; 74 | 75 | this.addon = new Ext.form.TextField({ 76 | fieldLabel: t('operator_textaddon_addon'), 77 | length: 255, 78 | width: 200, 79 | value: this.node.data.configAttributes.addon 80 | }); 81 | 82 | 83 | 84 | this.configPanel = new Ext.Panel({ 85 | layout: "form", 86 | bodyStyle: "padding: 10px;", 87 | items: [this.addon], 88 | buttons: [{ 89 | text: t("apply"), 90 | iconCls: "pimcore_icon_apply", 91 | handler: function () { 92 | this.commitData(); 93 | }.bind(this) 94 | }] 95 | }); 96 | 97 | this.window = new Ext.Window({ 98 | width: 400, 99 | height: 350, 100 | modal: true, 101 | title: t('operator_textaddon'), 102 | layout: "fit", 103 | items: [this.configPanel] 104 | }); 105 | 106 | this.window.show(); 107 | return this.window; 108 | }, 109 | 110 | commitData: function() { 111 | this.node.data.configAttributes.addon = this.addon.getValue(); 112 | this.node.set('text', t("operator_textaddon") + (this.addon.getValue() ? ': ' + this.addon.getValue() : '')); 113 | this.window.close(); 114 | } 115 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/operator/TranslateValue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TranslateValue"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator.TranslateValue = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | type: "operator", 16 | class: "TranslateValue", 17 | iconCls: "pimcore_icon_localizedfields", 18 | defaultText: "operator_translate_value", 19 | 20 | 21 | getConfigTreeNode: function(configAttributes) { 22 | if(configAttributes) { 23 | var node = { 24 | draggable: true, 25 | iconCls: this.iconCls, 26 | text: t("operator_translate_value"), 27 | configAttributes: configAttributes, 28 | isTarget: true, 29 | maxChildCount: 1, 30 | expanded: true, 31 | leaf: false, 32 | expandable: false 33 | }; 34 | } else { 35 | 36 | //For building up operator list 37 | var configAttributes = { type: this.type, class: this.class}; 38 | 39 | var node = { 40 | draggable: true, 41 | iconCls: this.iconCls, 42 | text: t(this.defaultText), 43 | configAttributes: configAttributes, 44 | isTarget: true, 45 | maxChildCount: 1, 46 | leaf: true 47 | }; 48 | } 49 | return node; 50 | }, 51 | 52 | 53 | getCopyNode: function(source) { 54 | var copy = source.createNode({ 55 | iconCls: this.iconCls, 56 | text: source.data.cssClass, 57 | isTarget: true, 58 | leaf: false, 59 | maxChildCount: 1, 60 | expanded: true, 61 | expandable: false, 62 | configAttributes: { 63 | label: null, 64 | type: this.type, 65 | class: this.class 66 | } 67 | }); 68 | return copy; 69 | }, 70 | 71 | 72 | getConfigDialog: function(node) { 73 | this.node = node; 74 | 75 | this.prefix = new Ext.form.TextField({ 76 | fieldLabel: t('operator_translate_value_prefix'), 77 | length: 255, 78 | width: 200, 79 | value: this.node.data.configAttributes.prefix 80 | }); 81 | 82 | 83 | 84 | this.configPanel = new Ext.Panel({ 85 | layout: "form", 86 | bodyStyle: "padding: 10px;", 87 | items: [this.prefix], 88 | buttons: [{ 89 | text: t("apply"), 90 | iconCls: "pimcore_icon_apply", 91 | handler: function () { 92 | this.commitData(); 93 | }.bind(this) 94 | }] 95 | }); 96 | 97 | this.window = new Ext.Window({ 98 | width: 400, 99 | height: 350, 100 | modal: true, 101 | title: t('operator_translate_value_settings'), 102 | layout: "fit", 103 | items: [this.configPanel] 104 | }); 105 | 106 | this.window.show(); 107 | return this.window; 108 | }, 109 | 110 | commitData: function() { 111 | this.node.data.configAttributes.prefix = this.prefix.getValue(); 112 | this.node.set('text', t("operator_translate_value") ); 113 | this.window.close(); 114 | } 115 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/value/DefaultValue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DefaultValue"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DefaultValue = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | 16 | type: "value", 17 | class: "DefaultValue", 18 | 19 | getConfigTreeNode: function(configAttributes) { 20 | var node = { 21 | draggable: true, 22 | iconCls: "pimcore_icon_" + configAttributes.dataType, 23 | text: configAttributes.text, 24 | qtip: configAttributes.attribute, 25 | configAttributes: configAttributes, 26 | isTarget: true, 27 | leaf: true 28 | }; 29 | 30 | return node; 31 | }, 32 | 33 | getCopyNode: function(source) { 34 | 35 | var copy = source.createNode({ 36 | iconCls: source.data.iconCls, 37 | text: source.data.text, 38 | isTarget: true, 39 | leaf: true, 40 | dataType: source.data.dataType, 41 | qtip: source.data.key, 42 | configAttributes: { 43 | label: null, 44 | type: this.type, 45 | class: this.class, 46 | attribute: source.data.key, 47 | dataType: source.data.dataType 48 | } 49 | }); 50 | return copy; 51 | }, 52 | 53 | getConfigDialog: function(node) { 54 | this.node = node; 55 | 56 | var value = "original"; 57 | if(this.node.data.configAttributes.label) { 58 | value = "custom"; 59 | } 60 | 61 | this.textfield = new Ext.form.TextField({ 62 | fieldLabel: t('custom_title'), 63 | disabled: true, 64 | length: 255, 65 | width: 200, 66 | value: this.node.data.text 67 | }); 68 | 69 | this.radiogroup = new Ext.form.RadioGroup({ 70 | fieldLabel: t('config_title'), 71 | vertical: false, 72 | columns: 1, 73 | value: {rb: value}, 74 | items: [ 75 | {boxLabel: t('config_title_original'), name: 'rb', inputValue: "original", checked: true}, 76 | { 77 | boxLabel: t('config_title_custom'), 78 | name: 'rb', 79 | inputValue: "custom", 80 | listeners: { 81 | change: function( element, newValue, oldValue, eOpts ) { 82 | this.textfield.setDisabled(!newValue); 83 | }.bind(this) 84 | } 85 | } 86 | ] 87 | }); 88 | 89 | this.icon = new Ext.form.TextField({ 90 | fieldLabel: t('custom_icon'), 91 | length: 255, 92 | width: 500, 93 | value: this.node.data.configAttributes.icon 94 | }); 95 | 96 | this.configPanel = new Ext.Panel({ 97 | layout: "form", 98 | bodyStyle: "padding: 10px;", 99 | items: [this.radiogroup, this.textfield, this.icon], 100 | buttons: [{ 101 | text: t("apply"), 102 | iconCls: "pimcore_icon_apply", 103 | handler: function () { 104 | this.commitData(); 105 | }.bind(this) 106 | }] 107 | }); 108 | 109 | this.window = new Ext.Window({ 110 | width: 500, 111 | height: 300, 112 | modal: true, 113 | title: t('attribute_settings'), 114 | layout: "fit", 115 | items: [this.configPanel] 116 | }); 117 | 118 | this.window.show(); 119 | return this.window; 120 | }, 121 | 122 | commitData: function() { 123 | if(this.radiogroup.getValue().rb == "custom") { 124 | this.node.data.configAttributes.label = this.textfield.getValue(); 125 | this.node.set('text', this.textfield.getValue()); 126 | } else { 127 | this.node.data.configAttributes.label = null; 128 | } 129 | 130 | var iconValue = this.icon ? this.icon.getValue() : null; 131 | if (iconValue != null && iconValue.length == 0) { 132 | iconValue = null; 133 | this.node.data.configAttributes.icon = iconValue; 134 | var restoredIconClass = "pimcore_icon_" + this.node.data.configAttributes.dataType; 135 | this.node.set('iconCls', restoredIconClass); 136 | } else if (iconValue != null) { 137 | this.node.set('iconCls', null); 138 | } 139 | this.node.data.configAttributes.icon = iconValue; 140 | this.node.set('icon', iconValue); 141 | 142 | this.window.close(); 143 | } 144 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/value/DimensionUnitField.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DimensionUnit"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DimensionUnitField = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | 16 | type: "value", 17 | class: "DimensionUnitField", 18 | 19 | getConfigTreeNode: function(configAttributes) { 20 | var node = { 21 | draggable: true, 22 | iconCls: "pimcore_icon_" + configAttributes.dataType, 23 | text: configAttributes.text, 24 | qtip: configAttributes.attribute, 25 | configAttributes: configAttributes, 26 | isTarget: true, 27 | leaf: true 28 | }; 29 | 30 | return node; 31 | }, 32 | 33 | getCopyNode: function(source) { 34 | var copy = source.createNode({ 35 | iconCls: source.data.iconCls, 36 | text: source.data.text, 37 | isTarget: true, 38 | leaf: true, 39 | dataType: source.data.dataType, 40 | qtip: source.data.key, 41 | configAttributes: { 42 | label: null, 43 | type: this.type, 44 | class: this.class, 45 | attribute: source.data.key, 46 | dataType: source.data.dataType 47 | } 48 | }); 49 | return copy; 50 | }, 51 | 52 | getConfigDialog: function(node) { 53 | this.node = node; 54 | 55 | var value = "original"; 56 | if(this.node.data.configAttributes.label) { 57 | value = "custom"; 58 | } 59 | 60 | this.textfield = new Ext.form.TextField({ 61 | fieldLabel: t('custom_title'), 62 | disabled: true, 63 | length: 255, 64 | width: 200, 65 | value: this.node.data.text 66 | }); 67 | 68 | this.radiogroup = new Ext.form.RadioGroup({ 69 | fieldLabel: t('config_title'), 70 | vertical: false, 71 | columns: 1, 72 | value: {rb: value}, 73 | items: [ 74 | {boxLabel: t('config_title_original'), name: 'rb', inputValue: "original", checked: true}, 75 | { 76 | boxLabel: t('config_title_custom'), 77 | name: 'rb', 78 | inputValue: "custom", 79 | listeners: { 80 | change: function(element, newValue) { 81 | this.textfield.setDisabled(!newValue); 82 | }.bind(this) 83 | } 84 | } 85 | ] 86 | }); 87 | 88 | this.combo = new Ext.form.ComboBox({ 89 | fieldLabel: t('dimension_unit_mode'), 90 | length: 255, 91 | width: 200, 92 | mode: 'local', 93 | store: new Ext.data.ArrayStore({ 94 | id: 0, 95 | fields: [ 96 | 'id', 97 | 'displayText' 98 | ], 99 | data: [[1, t('raw_data')], [2, t('only_value')], [3, t('value_with_unit')]] 100 | }), 101 | valueField: 'id', 102 | displayField: 'displayText', 103 | value: this.node.data.configAttributes.mode 104 | }); 105 | 106 | 107 | this.configPanel = new Ext.Panel({ 108 | layout: "form", 109 | bodyStyle: "padding: 10px;", 110 | items: [this.radiogroup, this.textfield, this.combo], 111 | buttons: [{ 112 | text: t("apply"), 113 | iconCls: "pimcore_icon_apply", 114 | handler: function () { 115 | this.commitData(); 116 | }.bind(this) 117 | }] 118 | }); 119 | 120 | this.window = new Ext.Window({ 121 | width: 400, 122 | modal: true, 123 | title: t('attribute_settings'), 124 | layout: "fit", 125 | items: [this.configPanel] 126 | }); 127 | 128 | this.window.show(); 129 | return this.window; 130 | }, 131 | 132 | commitData: function() { 133 | if(this.radiogroup.getValue().rb == "custom") { 134 | this.node.data.configAttributes.label = this.textfield.getValue(); 135 | this.node.set('text', this.textfield.getValue()); 136 | } else { 137 | this.node.data.configAttributes.label = null; 138 | } 139 | this.node.data.configAttributes.mode = this.combo.getValue(); 140 | this.window.close(); 141 | } 142 | }); 143 | -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/value/DimensionUnitFieldText.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DimensionUnit"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DimensionUnitFieldText = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.DimensionUnitField, { 15 | type: "value", 16 | class: "DimensionUnitFieldText" 17 | }); -------------------------------------------------------------------------------- /src/Resources/public/js/outputDataConfigElements/value/Numeric.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This source file is available under the terms of the 3 | * Pimcore Open Core License (POCL) 4 | * Full copyright and license information is available in 5 | * LICENSE.md which is distributed with this source code. 6 | * 7 | * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.com) 8 | * @license Pimcore Open Core License (POCL) 9 | */ 10 | 11 | 12 | pimcore.registerNS("pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.Numeric"); 13 | 14 | pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.value.Numeric = Class.create(pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract, { 15 | 16 | type: "value", 17 | class: "Numeric", 18 | 19 | getConfigTreeNode: function(configAttributes) { 20 | var node = { 21 | draggable: true, 22 | iconCls: "pimcore_icon_" + configAttributes.dataType, 23 | text: configAttributes.text, 24 | qtip: configAttributes.attribute, 25 | configAttributes: configAttributes, 26 | isTarget: true, 27 | leaf: true 28 | }; 29 | 30 | return node; 31 | }, 32 | 33 | getCopyNode: function(source) { 34 | var copy = source.createNode({ 35 | iconCls: source.data.iconCls, 36 | text: source.data.text, 37 | isTarget: true, 38 | leaf: true, 39 | dataType: source.data.dataType, 40 | qtip: source.data.key, 41 | configAttributes: { 42 | label: null, 43 | type: this.type, 44 | class: this.class, 45 | attribute: source.data.key, 46 | dataType: source.data.dataType 47 | } 48 | }); 49 | return copy; 50 | }, 51 | 52 | getConfigDialog: function(node) { 53 | this.node = node; 54 | 55 | var value = "original"; 56 | if(this.node.data.configAttributes.label) { 57 | value = "custom"; 58 | } 59 | 60 | this.textfield = new Ext.form.TextField({ 61 | fieldLabel: t('custom_title'), 62 | disabled: true, 63 | length: 255, 64 | width: 200, 65 | value: this.node.data.text 66 | }); 67 | 68 | this.radiogroup = new Ext.form.RadioGroup({ 69 | fieldLabel: t('config_title'), 70 | vertical: false, 71 | columns: 1, 72 | value: {rb: value}, 73 | items: [ 74 | {boxLabel: t('config_title_original'), name: 'rb', inputValue: "original", checked: true}, 75 | { 76 | boxLabel: t('config_title_custom'), 77 | name: 'rb', 78 | inputValue: "custom", 79 | listeners: { 80 | change: function(element, newValue) { 81 | this.textfield.setDisabled(!newValue); 82 | }.bind(this) 83 | } 84 | } 85 | ] 86 | }); 87 | 88 | this.formatNumber = new Ext.form.Checkbox({ 89 | fieldLabel: t('format_number'), 90 | length: 255, 91 | width: 200, 92 | checked: this.node.data.configAttributes.formatNumber 93 | }); 94 | 95 | 96 | this.precision = new Ext.form.NumberField({ 97 | fieldLabel: t('precision'), 98 | length: 255, 99 | width: 200, 100 | value: this.node.data.configAttributes.precision 101 | }); 102 | 103 | this.configPanel = new Ext.Panel({ 104 | layout: "form", 105 | bodyStyle: "padding: 10px;", 106 | items: [this.radiogroup, this.textfield, this.formatNumber, this.precision], 107 | buttons: [{ 108 | text: t("apply"), 109 | iconCls: "pimcore_icon_apply", 110 | handler: function () { 111 | this.commitData(); 112 | }.bind(this) 113 | }] 114 | }); 115 | 116 | this.window = new Ext.Window({ 117 | width: 400, 118 | height: 320, 119 | modal: true, 120 | title: t('attribute_settings'), 121 | layout: "fit", 122 | items: [this.configPanel] 123 | }); 124 | 125 | this.window.show(); 126 | return this.window; 127 | }, 128 | 129 | commitData: function() { 130 | this.node.data.configAttributes.precision = this.precision.getValue(); 131 | this.node.data.configAttributes.formatNumber = this.formatNumber.getValue(); 132 | if(this.radiogroup.getValue().rb == "custom") { 133 | this.node.data.configAttributes.label = this.textfield.getValue(); 134 | this.node.set('text', this.textfield.getValue()); 135 | } else { 136 | this.node.data.configAttributes.label = null; 137 | } 138 | this.window.close(); 139 | } 140 | }); -------------------------------------------------------------------------------- /src/Resources/translations/admin.ca.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.cs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.de.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: "Zur\xFCcksetzen" 3 | operator_concatenator: Operator Kombinierung 4 | operator_text: Operator Text 5 | operator_translate_value: "Operator Wert \xFCbersetzen" 6 | class_definition: Klassendefinition 7 | operators: Operatoren 8 | operator_group: Operator Gruppierung 9 | output_channel_definition: Ausgabekanaldefinition 10 | output_channel_definition_for: "Ausgabekanaldefinition f\xFCr" 11 | channel: Channel 12 | objectid: Objekt ID 13 | overwrite/edit: "\xDCberschreiben/Editieren" 14 | outputdataconfig: Definition Ausgabeformate 15 | attribute_settings: Attributeinstellungen 16 | config_title: Titel 17 | config_title_original: Originaltitel 18 | config_title_custom: Eigener Titel 19 | custom_title: Eigener Titel 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimensions-einheitenmodus 22 | value_with_unit: Wert mit Einheit 23 | raw_data: Rohdaten 24 | only_value: Nur Wert 25 | config_table: Einstellungen Tabelle 26 | config_whole_table: Gesamte Tabelle 27 | config_specific_field: Spezielles Feld 28 | row: Zeile 29 | column: Spalte 30 | text_operator_settings: Operator Text Einstellungen 31 | glue: Verbindungs-zeichen 32 | concatenator_operator_settings: Operator Kombinierung Einstellungen 33 | group_operator_settings: Operator Gruppierung Einstellungen 34 | reset_outputdataconfig: "Ausgabedateneinstellungen zur\xFCcksetzen" 35 | reset_outputdataconfig_text: "Ausgabedateneinstellungen zur\xFCcksetzen und die des 36 | Elternobjekts verwenden." 37 | error_reseting_output_config: "Fehler beim Zur\xFCcksetzen der Ausgabedateneinstellungen." 38 | error_opening_output_config: "Fehler beim \xD6ffnen der Ausgabedateneinstellungen." 39 | output_config_saved: Ausgabedateneinstellungen erfolgreich gespeichert. 40 | error_saving_output_config: Fehler beim Speichern der Ausgabedateneinstellungen. 41 | error_getting_field_definition: Fehler beim Laden der Felddefinitionen. 42 | operator_table: Operator Tabelle 43 | table_operator_settings: Operator Tabelle Einstellungen 44 | operator_tablerow: Operator Tabelle Zeile 45 | operator_tablecol: Operator Tablle Spalte 46 | tablecol_operator_settings: Operator Tabelle Spalte Einstellungen 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Ausgabedateneinstellungen 49 | bundle_outputDataConfigToolkit: Ausgangsdaten-Konfigurationen 50 | headline: "\xDCberschrift" 51 | tablerow_operator_settings: Operator Table Zeile Einstellungen 52 | force_value: immer Wert anzeigen 53 | keyvalue_tag_col_group_description: Gruppenbeschreibung 54 | keyvalue_selected_keys: "Ausgew\xE4hlte Schl\xFCssel" 55 | format_number: Zahl formatieren 56 | precision: Nachkommastellen 57 | operator_translate_value_settings: "Operator Wert \xFCbersetzen Einstellungen" 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Zellformater 60 | operator_cell_formater_settings: Operator 'Zellformater' Einstellungen 61 | operator_cell_formater_css_class: CSS Klasse 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Zusatz 64 | operator_textaddon_addon: Text Zusatz 65 | add_all: "Alles hinzuf\xFCgen" 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.en.yml: -------------------------------------------------------------------------------- 1 | class_definition: Class definition 2 | operators: Operators 3 | operator_text: Operator Text 4 | operator_group: Operator Group 5 | operator_concatenator: Operator Concatenator 6 | output_channel_definition: Output Channel Definition 7 | output_channel_definition_for: Output Channel Definition for 8 | channel: Channel 9 | objectid: Object ID 10 | overwrite/edit: Overwrite/Edit 11 | reset: Reset 12 | outputdataconfig: Output Data Configuration 13 | attribute_settings: Attribute Settings 14 | config_title: Title 15 | config_title_original: Original Title 16 | config_title_custom: Custom Title 17 | custom_title: Custom Title 18 | custom_icon: Custom Icon 19 | dimension_unit_mode: Dimension Unit Mode 20 | value_with_unit: Value with Unit 21 | raw_data: Raw Data 22 | only_value: Only Value 23 | config_table: Config Table 24 | config_whole_table: Get Whole Table 25 | config_specific_field: Get Specific Field 26 | row: Row 27 | column: Column 28 | text_operator_settings: Operator Text Settings 29 | glue: Glue 30 | concatenator_operator_settings: Operator Concatenator Settings 31 | group_operator_settings: Operator Group Settings 32 | reset_outputdataconfig: Reset Output Data Config 33 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data object. 34 | error_reseting_output_config: Error during resetting Output Config Data. 35 | error_opening_output_config: Error during opening Output Config Data. 36 | output_config_saved: Output Config Data saved successfully 37 | error_saving_output_config: Error during saving Output Config Data. 38 | error_getting_field_definition: Error during getting Field Definition. 39 | operator_table: Operator Table 40 | table_operator_settings: Operator Table Settings 41 | operator_tablerow: Operator Table Row 42 | operator_tablecol: Operator Table Column 43 | tablecol_operator_settings: Operator Table Column Settings 44 | colspan: Column span 45 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 46 | bundle_outputDataConfigToolkit: Output Data Configurations 47 | headline: Headline 48 | tablerow_operator_settings: Operator Table Row Settings 49 | force_value: Force Value 50 | keyvalue_tag_col_group_description: Group Description 51 | keyvalue_selected_keys: Selected Keys 52 | format_number: Format number 53 | precision: Precision 54 | operator_translate_value: Operator Translate Value 55 | operator_translate_value_settings: Operator Translate Value Settings 56 | operator_translate_value_prefix: Prefix 57 | operator_cell_formater: "Operator Cell Formater" 58 | operator_cell_formater_settings: "Operator 'Cell Formater' Settings" 59 | operator_cell_formater_css_class: "CSS Class" 60 | operator_cell_formater_css_styles: "CSS Style" 61 | operator_textaddon: Operator Text Addon 62 | operator_textaddon_addon: Text Addon 63 | add_all: Add all -------------------------------------------------------------------------------- /src/Resources/translations/admin.es.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reiniciar 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.fr.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: "Remise \xE0 z\xE9ro" 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: "D\xE9finition de classe" 7 | operators: "Op\xE9rateurs" 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: "Remplacer / \xC9diter" 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Titre 17 | config_title_original: Titre original 18 | config_title_custom: "Titre personnalis\xE9" 19 | custom_title: "Titre personnalis\xE9" 20 | custom_icon: "Ic\xF4ne personnalis\xE9" 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: "Valeur avec unit\xE9" 23 | raw_data: "Donn\xE9es brutes" 24 | only_value: Valeur seule 25 | config_table: Config Table 26 | config_whole_table: "R\xE9cup\xE9rer le tableau complet" 27 | config_specific_field: "R\xE9cup\xE9rer un champ sp\xE9cifique" 28 | row: Ligne 29 | column: Colonne 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: "Cl\xE9s s\xE9lectionn\xE9es" 55 | format_number: Format number 56 | precision: "Pr\xE9cision" 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: "Pr\xE9fixe" 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: Classe CSS 62 | operator_cell_formater_css_styles: Style CSS 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Tout ajouter 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.hu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: "Vissza\xE1ll\xEDt\xE1s" 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.it.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reimposta 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.nl.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Wissen 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.pl.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.pt_br.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.ro.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.sk.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.sv.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: "\xC5terst\xE4ll" 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Rad 29 | column: Kolumn 30 | text_operator_settings: Operator Text Settings 31 | glue: Lim 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: "Forcera v\xE4rde" 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.th.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: "\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E2B\u0E21\u0E48" 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Resources/translations/admin.zh_Hans.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reset: Reset 3 | operator_concatenator: Operator Concatenator 4 | operator_text: Operator Text 5 | operator_translate_value: Operator Translate Value 6 | class_definition: Class definition 7 | operators: Operators 8 | operator_group: Operator Group 9 | output_channel_definition: Output Channel Definition 10 | output_channel_definition_for: Output Channel Definition for 11 | channel: Channel 12 | objectid: Object ID 13 | overwrite/edit: Overwrite/Edit 14 | outputdataconfig: Output Data Configuration 15 | attribute_settings: Attribute Settings 16 | config_title: Title 17 | config_title_original: Original Title 18 | config_title_custom: Custom Title 19 | custom_title: Custom Title 20 | custom_icon: Custom Icon 21 | dimension_unit_mode: Dimension Unit Mode 22 | value_with_unit: Value with Unit 23 | raw_data: Raw Data 24 | only_value: Only Value 25 | config_table: Config Table 26 | config_whole_table: Get Whole Table 27 | config_specific_field: Get Specific Field 28 | row: Row 29 | column: Column 30 | text_operator_settings: Operator Text Settings 31 | glue: Glue 32 | concatenator_operator_settings: Operator Concatenator Settings 33 | group_operator_settings: Operator Group Settings 34 | reset_outputdataconfig: Reset Output Data Config 35 | reset_outputdataconfig_text: Reset Output Data Config and use it from parent data 36 | object. 37 | error_reseting_output_config: Error during resetting Output Config Data. 38 | error_opening_output_config: Error during opening Output Config Data. 39 | output_config_saved: Output Config Data saved successfully 40 | error_saving_output_config: Error during saving Output Config Data. 41 | error_getting_field_definition: Error during getting Field Definition. 42 | operator_table: Operator Table 43 | table_operator_settings: Operator Table Settings 44 | operator_tablerow: Operator Table Row 45 | operator_tablecol: Operator Table Column 46 | tablecol_operator_settings: Operator Table Column Settings 47 | colspan: Column span 48 | permissions_bundle_outputDataConfigToolkit: Output Data Configurations 49 | bundle_outputDataConfigToolkit: Output Data Configurations 50 | headline: Headline 51 | tablerow_operator_settings: Operator Table Row Settings 52 | force_value: Force Value 53 | keyvalue_tag_col_group_description: Group Description 54 | keyvalue_selected_keys: Selected Keys 55 | format_number: Format number 56 | precision: Precision 57 | operator_translate_value_settings: Operator Translate Value Settings 58 | operator_translate_value_prefix: Prefix 59 | operator_cell_formater: Operator Cell Formater 60 | operator_cell_formater_settings: Operator 'Cell Formater' Settings 61 | operator_cell_formater_css_class: CSS Class 62 | operator_cell_formater_css_styles: CSS Style 63 | operator_textaddon: Operator Text Addon 64 | operator_textaddon_addon: Text Addon 65 | add_all: Add all 66 | ... 67 | -------------------------------------------------------------------------------- /src/Service.php: -------------------------------------------------------------------------------- 1 | getClass(); 41 | } 42 | 43 | $outputDataConfig = OutputDefinition::getByObjectIdClassIdChannel($object->getId(), $objectClass->getId(), $channel); 44 | if (empty($outputDataConfig)) { 45 | while (empty($outputDataConfig) && !empty($object)) { 46 | $object = $object->getParent(); 47 | $outputDataConfig = OutputDefinition::getByObjectIdClassIdChannel($object->getId(), $objectClass->getId(), $channel); 48 | } 49 | } 50 | 51 | return self::buildOutputDataConfig($outputDataConfig, $context); 52 | } 53 | 54 | /** 55 | * @param $outputDataConfig 56 | * 57 | * @return IConfigElement[] 58 | */ 59 | public static function buildOutputDataConfig($outputDataConfig, $context = null) 60 | { 61 | $config = []; 62 | $jsonConfig = json_decode($outputDataConfig->getConfiguration()); 63 | 64 | return self::doBuildConfig($jsonConfig, $config, $context); 65 | } 66 | 67 | private static function locateConfigClass(string $type, $configElement): string 68 | { 69 | $namespaces = [ 70 | '\\AppBundle\\OutputDataConfigToolkit\\ConfigElement\\' . $type . '\\', 71 | '\\App\\OutputDataConfigToolkit\\ConfigElement\\' . $type . '\\', 72 | '\\OutputDataConfigToolkitBundle\\ConfigElement\\' . $type . '\\', 73 | ]; 74 | 75 | foreach ($namespaces as $namespace) { 76 | $name = $namespace.ucfirst($configElement->class); 77 | if (class_exists($name)) { 78 | return $name; 79 | } 80 | } 81 | 82 | return ''; 83 | } 84 | 85 | private static function doBuildConfig($jsonConfig, $config, $context = null) 86 | { 87 | if (!empty($jsonConfig)) { 88 | foreach ($jsonConfig as $configElement) { 89 | if ($configElement->type == 'value') { 90 | $name = self::locateConfigClass('Value', $configElement); 91 | 92 | if (class_exists($name)) { 93 | $config[] = new $name($configElement, $context); 94 | } 95 | } elseif ($configElement->type == 'operator') { 96 | $className = self::locateConfigClass('Operator', $configElement); 97 | if (!empty($configElement->childs)) { 98 | $configElement->childs = self::doBuildConfig($configElement->childs, [], $context); 99 | } 100 | 101 | if (!empty($className)) { 102 | $config[] = new $className($configElement, $context); 103 | } 104 | } 105 | } 106 | } 107 | 108 | return $config; 109 | } 110 | 111 | /** 112 | * inits channels for root object 113 | */ 114 | public static function initChannelsForRootobject() 115 | { 116 | $channels = self::getChannels(); 117 | 118 | $classList = new ClassDefinition\Listing(); 119 | $classList = $classList->load(); 120 | 121 | foreach ($classList as $class) { 122 | foreach ($channels as $channel) { 123 | $def = OutputDefinition::getByObjectIdClassIdChannel(1, $class->getId(), $channel); 124 | if (empty($def)) { 125 | $def = new OutputDefinition(); 126 | $def->setObjectId(1); 127 | $def->setClassId($class->getId()); 128 | $def->setChannel($channel); 129 | $def->save(); 130 | } 131 | } 132 | } 133 | } 134 | 135 | public static function getChannels() 136 | { 137 | $config = self::getConfig(); 138 | 139 | $channels = []; 140 | $channelsConfig = $config['channels']; 141 | if ($channelsConfig) { 142 | foreach ($channelsConfig as $c) { 143 | $channels[] = (string)$c; 144 | } 145 | } 146 | 147 | return $channels; 148 | } 149 | 150 | public static function getConfig() 151 | { 152 | $file = \Pimcore\Config::locateConfigFile('outputdataconfig/config.php'); 153 | if (file_exists($file)) { 154 | $config = include($file); 155 | } else { 156 | $filesystem = new Filesystem(); 157 | $filesystem->dumpFile($file, to_php_data_file_format([])); 158 | $config = []; 159 | } 160 | 161 | return $config; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /src/Tools/Installer.php: -------------------------------------------------------------------------------- 1 | mkdir(PIMCORE_CUSTOM_CONFIGURATION_DIRECTORY . '/outputdataconfig', 0775); 28 | copy(__DIR__ . '/../../install/config.php', PIMCORE_CUSTOM_CONFIGURATION_DIRECTORY . '/outputdataconfig/config.php'); 29 | } 30 | 31 | $db = \Pimcore\Db::get(); 32 | $db->executeQuery('CREATE TABLE `' . Dao::TABLE_NAME . '` ( 33 | `id` int(11) NOT NULL AUTO_INCREMENT, 34 | `objectId` int(11) NOT NULL, 35 | `classId` varchar(50) NOT NULL, 36 | `channel` varchar(255) NOT NULL, 37 | `configuration` longtext, 38 | PRIMARY KEY (`id`), 39 | UNIQUE KEY `Unique` (`objectId`,`classId`,`channel`) 40 | ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; 41 | '); 42 | 43 | $db->executeQuery("INSERT INTO users_permission_definitions (`key`) VALUES ('bundle_outputDataConfigToolkit');"); 44 | } 45 | 46 | public function needsReloadAfterInstall(): bool 47 | { 48 | return true; 49 | } 50 | 51 | public function isInstalled(): bool 52 | { 53 | try { 54 | $check = \Pimcore\Db::get()->fetchOne('SELECT `id` FROM ' . Dao::TABLE_NAME . ' LIMIT 1;'); 55 | 56 | return true; 57 | } catch (\Exception $e) { 58 | return false; 59 | } 60 | } 61 | 62 | public function canBeInstalled(): bool 63 | { 64 | return !$this->isInstalled(); 65 | } 66 | 67 | public function canBeUninstalled(): bool 68 | { 69 | return true; 70 | } 71 | 72 | public function uninstall(): void 73 | { 74 | $db = \Pimcore\Db::get(); 75 | $db->executeQuery('DROP TABLE IF EXISTS `' . Dao::TABLE_NAME . '`;'); 76 | 77 | $db->executeQuery("DELETE FROM users_permission_definitions WHERE `key` = 'bundle_outputDataConfigToolkit'"); 78 | if ($this->isInstalled()) { 79 | throw new InstallationException('Could not be uninstalled.'); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/Tools/Util.php: -------------------------------------------------------------------------------- 1 |