├── .env.dist ├── .gitignore ├── .htaccess ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── bin ├── console └── phpunit ├── composer.json ├── composer.lock ├── config ├── bundles.php ├── packages │ ├── dev │ │ ├── routing.yaml │ │ └── web_profiler.yaml │ ├── framework.yaml │ ├── routing.yaml │ ├── sensio_framework_extra.yaml │ ├── test │ │ ├── framework.yaml │ │ └── web_profiler.yaml │ ├── twig.yaml │ └── twig_extensions.yaml ├── routes │ ├── annotations.yaml │ └── dev │ │ └── web_profiler.yaml └── services.yaml ├── docker-compose.yml ├── index.php ├── phpunit.xml.dist └── src ├── Kernel.php └── Umc ├── CoreBundle ├── Config │ ├── FileLoader.php │ ├── Form │ │ ├── Config.php │ │ └── Modifier │ │ │ └── Tab.php │ ├── Loader.php │ ├── Loader │ │ └── PlatformAwareFactory.php │ ├── Modifier │ │ ├── Composite.php │ │ ├── ModifierInterface.php │ │ ├── Parameter.php │ │ ├── Remove.php │ │ └── Sort.php │ ├── ParamMerger.php │ ├── ProcessorFactory.php │ ├── Provider.php │ ├── Provider │ │ └── Factory.php │ └── Source │ │ └── Config.php ├── Controller │ ├── DownloadController.php │ ├── EditController.php │ ├── HelpController.php │ ├── IndexController.php │ ├── ListController.php │ ├── SaveController.php │ ├── SaveSettingsController.php │ └── SettingsController.php ├── DependencyInjection │ └── UmcCoreExtension.php ├── Model │ ├── Attribute.php │ ├── Attribute │ │ ├── Dynamic.php │ │ ├── Dynamic │ │ │ ├── Factory.php │ │ │ ├── Option.php │ │ │ ├── Option │ │ │ │ └── Factory.php │ │ │ └── Type │ │ │ │ ├── BaseType.php │ │ │ │ └── Factory.php │ │ ├── Factory.php │ │ ├── Option.php │ │ ├── Option │ │ │ └── Factory.php │ │ └── Type │ │ │ ├── BaseType.php │ │ │ └── Factory.php │ ├── Entity.php │ ├── Entity │ │ └── Factory.php │ ├── Module.php │ ├── Module │ │ ├── Factory.php │ │ └── Factory │ │ │ └── Locator.php │ ├── Platform.php │ ├── Platform │ │ ├── Builder.php │ │ ├── Config.php │ │ ├── ConfigException.php │ │ ├── Factory.php │ │ ├── Pool.php │ │ ├── Version.php │ │ └── Version │ │ │ └── Factory.php │ ├── Relation.php │ └── Relation │ │ └── Factory.php ├── Repository │ ├── Module.php │ ├── Settings.php │ └── Settings │ │ └── MissingSettingsFileException.php ├── Resources │ ├── config │ │ ├── extensible_parameters.yml │ │ ├── form │ │ │ ├── attribute.yml │ │ │ ├── dynamic.yml │ │ │ ├── entity.yml │ │ │ ├── module.yml │ │ │ ├── option.yml │ │ │ └── relation.yml │ │ └── services.xml │ ├── public │ │ ├── bootstrap │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── bootstrap.min.js.map │ │ │ │ └── popper.js │ │ ├── font-awesome │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ ├── font-awesome.css.map │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.eot │ │ │ │ ├── fa-brands-400.svg │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-brands-400.woff │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.eot │ │ │ │ ├── fa-regular-400.svg │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ ├── fa-solid-900.eot │ │ │ │ ├── fa-solid-900.svg │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff │ │ │ │ └── fa-solid-900.woff2 │ │ ├── jquery-ui │ │ │ ├── AUTHORS.txt │ │ │ ├── LICENSE.txt │ │ │ ├── external │ │ │ │ └── jquery │ │ │ │ │ └── jquery.js │ │ │ ├── font │ │ │ │ ├── jquery-ui.eot │ │ │ │ ├── jquery-ui.svg │ │ │ │ ├── jquery-ui.ttf │ │ │ │ ├── jquery-ui.woff │ │ │ │ └── jquery-ui.woff2 │ │ │ ├── images │ │ │ │ ├── ui-bg_glass_20_555555_1x400.png │ │ │ │ ├── ui-bg_glass_40_0078a3_1x400.png │ │ │ │ ├── ui-bg_glass_40_ffc73d_1x400.png │ │ │ │ ├── ui-bg_gloss-wave_25_333333_500x100.png │ │ │ │ ├── ui-bg_highlight-soft_80_eeeeee_1x100.png │ │ │ │ ├── ui-bg_inset-soft_25_000000_1x100.png │ │ │ │ ├── ui-bg_inset-soft_30_f58400_1x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_4b8e0b_256x240.png │ │ │ │ ├── ui-icons_a83300_256x240.png │ │ │ │ ├── ui-icons_cccccc_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── index.html │ │ │ ├── jquery-ui.css │ │ │ ├── jquery-ui.icon-font.css │ │ │ ├── jquery-ui.js │ │ │ ├── jquery-ui.min.css │ │ │ ├── jquery-ui.min.js │ │ │ ├── jquery-ui.structure.css │ │ │ ├── jquery-ui.structure.min.css │ │ │ ├── jquery-ui.theme.css │ │ │ ├── jquery-ui.theme.min.css │ │ │ └── package.json │ │ ├── jquery │ │ │ ├── form-validator.js │ │ │ ├── jquery.ajax-progress.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ └── jquery.min.map │ │ ├── ko │ │ │ ├── ko.js │ │ │ └── ko.sortable.js │ │ ├── select2 │ │ │ ├── select2-bootstrap.css │ │ │ ├── select2.css │ │ │ └── select2.js │ │ └── umc │ │ │ ├── dark-mode.js │ │ │ ├── edit.js │ │ │ ├── info.js │ │ │ ├── settings.js │ │ │ ├── umc.css │ │ │ └── umc.js │ └── views │ │ ├── base.html.twig │ │ ├── edit.html.twig │ │ ├── edit │ │ ├── form.html.twig │ │ └── form │ │ │ ├── elements │ │ │ └── validation.html.twig │ │ │ └── field │ │ │ ├── checkbox.html.twig │ │ │ ├── choice.html.twig │ │ │ ├── radio.html.twig │ │ │ ├── text.html.twig │ │ │ ├── textarea.html.twig │ │ │ └── validation.html.twig │ │ ├── help.html.twig │ │ ├── index.html.twig │ │ ├── index │ │ └── menu.html.twig │ │ ├── list.html.twig │ │ ├── modal.html.twig │ │ ├── settings.html.twig │ │ └── settings │ │ └── form.html.twig ├── Service │ ├── Archiver.php │ ├── Builder.php │ ├── Cs │ │ ├── Executor.php │ │ └── ProcessFactory.php │ ├── FileFinderFactory.php │ ├── Generator │ │ ├── ContentProcessor.php │ │ ├── Entity.php │ │ ├── GeneratorInterface.php │ │ ├── Module.php │ │ ├── Pool.php │ │ └── Pool │ │ │ └── Locator.php │ ├── License │ │ ├── Pool.php │ │ └── Processor.php │ ├── Locator.php │ ├── Validator │ │ ├── Children.php │ │ ├── CompositeValidator.php │ │ ├── EntityName.php │ │ ├── Locator.php │ │ ├── NotSame.php │ │ ├── Pool.php │ │ ├── RestrictedWords.php │ │ ├── UniqueChildren.php │ │ ├── ValidationException.php │ │ └── ValidatorInterface.php │ └── ZipArchiveFactory.php ├── Tests │ └── Unit │ │ ├── Config │ │ ├── FileLoaderTest.php │ │ ├── Form │ │ │ └── Modifier │ │ │ │ └── TabTest.php │ │ ├── Loader │ │ │ └── PlatformAwareFactoryTest.php │ │ ├── LoaderTest.php │ │ ├── Modifier │ │ │ ├── CompositeTest.php │ │ │ ├── ParameterTest.php │ │ │ ├── RemoveTest.php │ │ │ └── SortTest.php │ │ ├── ParamMergerTest.php │ │ ├── ProcessorFactoryTest.php │ │ ├── Provider │ │ │ └── FactoryTest.php │ │ └── ProviderTest.php │ │ ├── Controller │ │ ├── DownloadControllerTest.php │ │ ├── EditControllerTest.php │ │ ├── HelpControllerTest.php │ │ ├── IndexControllerTest.php │ │ ├── ListControllerTest.php │ │ ├── SaveControllerTest.php │ │ ├── SaveSettingsControllerTest.php │ │ └── SettingsControllerTest.php │ │ ├── Model │ │ ├── Attribute │ │ │ ├── Dynamic │ │ │ │ ├── FactoryTest.php │ │ │ │ ├── Option │ │ │ │ │ └── FactoryTest.php │ │ │ │ ├── OptionTest.php │ │ │ │ └── Type │ │ │ │ │ ├── BaseTypeTest.php │ │ │ │ │ └── FactoryTest.php │ │ │ ├── DynamicTest.php │ │ │ ├── FactoryTest.php │ │ │ ├── Option │ │ │ │ └── FactoryTest.php │ │ │ ├── OptionTest.php │ │ │ └── Type │ │ │ │ ├── BaseTypeTest.php │ │ │ │ └── FactoryTest.php │ │ ├── AttributeTest.php │ │ ├── Entity │ │ │ └── FactoryTest.php │ │ ├── EntityTest.php │ │ ├── Module │ │ │ ├── Factory │ │ │ │ └── LocatorTest.php │ │ │ └── FactoryTest.php │ │ ├── ModuleTest.php │ │ ├── Platform │ │ │ ├── BuilderTest.php │ │ │ ├── FactoryTest.php │ │ │ ├── PoolTest.php │ │ │ ├── Version │ │ │ │ └── FactoryTest.php │ │ │ └── VersionTest.php │ │ ├── PlatformTest.php │ │ ├── Relation │ │ │ └── FactoryTest.php │ │ └── RelationTest.php │ │ ├── Repository │ │ ├── ModuleTest.php │ │ └── SettingsTest.php │ │ ├── Service │ │ ├── ArchiverTest.php │ │ ├── BuilderTest.php │ │ ├── Cs │ │ │ ├── ExecutorTest.php │ │ │ └── ProcessFactoryTest.php │ │ ├── FinderFactoryTest.php │ │ ├── Generator │ │ │ ├── ContentProcessorTest.php │ │ │ ├── EntityTest.php │ │ │ ├── ModuleTest.php │ │ │ ├── Pool │ │ │ │ └── LocatorTest.php │ │ │ └── PoolTest.php │ │ ├── License │ │ │ ├── PoolTest.php │ │ │ └── ProcessorTest.php │ │ ├── LocatorTest.php │ │ ├── Validator │ │ │ ├── ChildrenTest.php │ │ │ ├── CompositeValidatorTest.php │ │ │ ├── EntityNameTest.php │ │ │ ├── LocatorTest.php │ │ │ ├── NotSameTest.php │ │ │ ├── PoolTest.php │ │ │ ├── RestrictedWordsTest.php │ │ │ └── UniqueChildrenTest.php │ │ └── ZipArchiveFactoryTest.php │ │ ├── Twig │ │ ├── LicenseTest.php │ │ ├── ModifiersTest.php │ │ └── SortMarkupTest.php │ │ ├── Util │ │ ├── SorterTest.php │ │ └── StringUtilTest.php │ │ ├── VersionTest.php │ │ └── _fixtures │ │ ├── download.zip │ │ └── yaml │ │ ├── not-valid.yml │ │ └── valid.yml ├── Twig │ ├── License.php │ ├── Modifiers.php │ └── SortMarkup.php ├── UmcCoreBundle.php ├── Util │ ├── Sorter.php │ └── StringUtil.php └── Version.php ├── MagentoBundle ├── DependencyInjection │ └── UmcMagentoExtension.php ├── Model │ ├── Attribute.php │ ├── Attribute │ │ ├── Dynamic.php │ │ ├── Dynamic │ │ │ └── Type │ │ │ │ ├── BaseType.php │ │ │ │ ├── ProductAttribute.php │ │ │ │ └── ProductAttributeSet.php │ │ └── Type │ │ │ ├── BaseType.php │ │ │ ├── Dropdown.php │ │ │ ├── Dynamic.php │ │ │ ├── ProductAttribute.php │ │ │ └── ProductAttributeSet.php │ ├── Entity.php │ ├── Module.php │ └── Module │ │ └── Factory.php ├── Resources │ ├── config │ │ ├── extensible_parameters.yml │ │ ├── form │ │ │ ├── attribute.yml │ │ │ ├── entity.yml │ │ │ └── module.yml │ │ ├── platform.yml │ │ ├── services.xml │ │ └── source │ │ │ ├── entity.yml │ │ │ ├── entity_unit_tests.yml │ │ │ ├── module.yml │ │ │ └── module_unit_tests.yml │ ├── public │ │ └── logo │ │ │ └── magento.png │ └── views │ │ ├── attribute │ │ ├── form │ │ │ ├── date.html.twig │ │ │ ├── dynamic.html.twig │ │ │ ├── dynamic │ │ │ │ ├── date.html.twig │ │ │ │ ├── select.html.twig │ │ │ │ ├── text.html.twig │ │ │ │ ├── textarea.html.twig │ │ │ │ └── yesno.html.twig │ │ │ ├── file.html.twig │ │ │ ├── select.html.twig │ │ │ ├── text.html.twig │ │ │ ├── textarea.html.twig │ │ │ ├── wysiwyg.html.twig │ │ │ └── yesno.html.twig │ │ ├── frontend │ │ │ ├── country.html.twig │ │ │ ├── date.html.twig │ │ │ ├── dynamic.html.twig │ │ │ ├── dynamic │ │ │ │ ├── country.html.twig │ │ │ │ ├── date.html.twig │ │ │ │ ├── option.html.twig │ │ │ │ ├── product_attribute.html.twig │ │ │ │ ├── product_attribute_set.html.twig │ │ │ │ ├── text.html.twig │ │ │ │ └── yesno.html.twig │ │ │ ├── editor.html.twig │ │ │ ├── file.html.twig │ │ │ ├── image.html.twig │ │ │ ├── option.html.twig │ │ │ ├── product_attribute.html.twig │ │ │ ├── product_attribute_set.html.twig │ │ │ ├── text.html.twig │ │ │ └── yesno.html.twig │ │ ├── grid │ │ │ ├── date.html.twig │ │ │ ├── image.html.twig │ │ │ ├── select.html.twig │ │ │ └── text.html.twig │ │ ├── interface │ │ │ ├── array.html.twig │ │ │ └── default.html.twig │ │ ├── model │ │ │ ├── default.html.twig │ │ │ ├── dynamic.html.twig │ │ │ └── multiselect.html.twig │ │ ├── schema_fk │ │ │ └── product_attribute_set.html.twig │ │ └── unit_test │ │ │ ├── country.html.twig │ │ │ ├── country_multiple.html.twig │ │ │ ├── date.html.twig │ │ │ ├── decimal.html.twig │ │ │ ├── default.html.twig │ │ │ ├── dynamic.html.twig │ │ │ ├── integer.html.twig │ │ │ ├── multiple.html.twig │ │ │ └── yesno.html.twig │ │ ├── entity │ │ ├── adminhtml │ │ │ └── di │ │ │ │ ├── actions.html.twig │ │ │ │ ├── buttons.html.twig │ │ │ │ ├── controller.html.twig │ │ │ │ ├── processor │ │ │ │ ├── provider.html.twig │ │ │ │ ├── provider │ │ │ │ │ ├── dynamic_rows.html.twig │ │ │ │ │ ├── file.html.twig │ │ │ │ │ ├── image.html.twig │ │ │ │ │ └── multiselect.html.twig │ │ │ │ ├── save.html.twig │ │ │ │ └── save │ │ │ │ │ ├── date.html.twig │ │ │ │ │ ├── dynamic_rows.html.twig │ │ │ │ │ ├── file.html.twig │ │ │ │ │ ├── image.html.twig │ │ │ │ │ └── multiselect.html.twig │ │ │ │ └── ui-config.html.twig │ │ └── di │ │ │ ├── collection.html.twig │ │ │ ├── preference.html.twig │ │ │ ├── store-handlers.html.twig │ │ │ └── store-link.html.twig │ │ └── source │ │ ├── Api │ │ ├── Data │ │ │ ├── _Entity_Interface.php.html.twig │ │ │ └── _Entity_SearchResultsInterface.php.html.twig │ │ ├── _Entity_ListRepositoryInterface.php.html.twig │ │ └── _Entity_RepositoryInterface.php.html.twig │ │ ├── Block │ │ ├── Adminhtml │ │ │ └── Button │ │ │ │ ├── Back.php.html.twig │ │ │ │ ├── Delete.php.html.twig │ │ │ │ ├── Reset.php.html.twig │ │ │ │ └── Save.php.html.twig │ │ └── _Entity_ │ │ │ └── Name.php.html.twig │ │ ├── Controller │ │ ├── Adminhtml │ │ │ ├── Delete.php.html.twig │ │ │ ├── Edit.php.html.twig │ │ │ ├── Index.php.html.twig │ │ │ ├── InlineEdit.php.html.twig │ │ │ ├── MassDelete.php.html.twig │ │ │ ├── NewAction.php.html.twig │ │ │ ├── Save.php.html.twig │ │ │ ├── Upload.php.html.twig │ │ │ └── _Entity_ │ │ │ │ ├── Delete.php.html.twig │ │ │ │ ├── Edit.php.html.twig │ │ │ │ ├── File │ │ │ │ └── Upload.php.html.twig │ │ │ │ ├── Image │ │ │ │ └── Upload.php.html.twig │ │ │ │ ├── Index.php.html.twig │ │ │ │ ├── InlineEdit.php.html.twig │ │ │ │ ├── MassDelete.php.html.twig │ │ │ │ ├── NewAction.php.html.twig │ │ │ │ └── Save.php.html.twig │ │ └── _Entity_ │ │ │ ├── Index.php.html.twig │ │ │ └── View.php.html.twig │ │ ├── Model │ │ ├── FileChecker.php.html.twig │ │ ├── FileInfo.php.html.twig │ │ ├── ResourceModel │ │ │ ├── AbstractModel.php.html.twig │ │ │ ├── Collection │ │ │ │ ├── AbstractCollection.php.html.twig │ │ │ │ └── StoreAwareAbstractCollection.php.html.twig │ │ │ ├── Relation │ │ │ │ └── Store │ │ │ │ │ ├── ReadHandler.php.html.twig │ │ │ │ │ └── SaveHandler.php.html.twig │ │ │ ├── Store.php.html.twig │ │ │ ├── StoreAwareAbstractModel.php.html.twig │ │ │ ├── _Entity_.php.html.twig │ │ │ └── _Entity_ │ │ │ │ └── Collection.php.html.twig │ │ ├── Search │ │ │ └── _Entity_.php.html.twig │ │ ├── Uploader.php.html.twig │ │ ├── _Entity_.php.html.twig │ │ ├── _Entity_ListRepo.php.html.twig │ │ ├── _Entity_Repo.php.html.twig │ │ ├── _Entity_SearchResults.php.html.twig │ │ ├── _Entity_UiCollectionProvider.php.html.twig │ │ └── _Entity_UiManager.php.html.twig │ │ ├── Plugin │ │ └── Theme │ │ │ └── Block │ │ │ └── Html │ │ │ └── TopmenuPlugin.php.html.twig │ │ ├── README.md.html.twig │ │ ├── Source │ │ ├── Catalog │ │ │ ├── ProductAttribute.php.html.twig │ │ │ └── ProductAttributeSet.php.html.twig │ │ ├── Options.php.html.twig │ │ ├── StoreView.php.html.twig │ │ └── _Entity_.php.html.twig │ │ ├── Test │ │ └── Unit │ │ │ ├── Block │ │ │ ├── Adminhtml │ │ │ │ └── Button │ │ │ │ │ ├── BackTest.php.html.twig │ │ │ │ │ ├── DeleteTest.php.html.twig │ │ │ │ │ ├── ResetTest.php.html.twig │ │ │ │ │ └── SaveTest.php.html.twig │ │ │ └── _Entity_ │ │ │ │ └── NameTest.php.html.twig │ │ │ ├── Controller │ │ │ ├── Adminhtml │ │ │ │ ├── DeleteTest.php.html.twig │ │ │ │ ├── EditTest.php.html.twig │ │ │ │ ├── IndexTest.php.html.twig │ │ │ │ ├── InlineEditTest.php.html.twig │ │ │ │ ├── MassDeleteTest.php.html.twig │ │ │ │ ├── NewActionTest.php.html.twig │ │ │ │ ├── SaveTest.php.html.twig │ │ │ │ └── UploadTest.php.html.twig │ │ │ └── _Entity_ │ │ │ │ ├── IndexTest.php.html.twig │ │ │ │ └── ViewTest.php.html.twig │ │ │ ├── Model │ │ │ ├── FileCheckerTest.php.html.twig │ │ │ ├── FileInfoTest.php.html.twig │ │ │ ├── ResourceModel │ │ │ │ ├── AbstractModelTest.php.html.twig │ │ │ │ ├── Collection │ │ │ │ │ ├── AbstractCollectionTest.php.html.twig │ │ │ │ │ └── StoreAwareAbstractCollectionTest.php.html.twig │ │ │ │ ├── Relation │ │ │ │ │ └── Store │ │ │ │ │ │ ├── ReadHandlerTest.php.html.twig │ │ │ │ │ │ └── SaveHandlerTest.php.html.twig │ │ │ │ ├── StoreAwareAbstractModelTest.php.html.twig │ │ │ │ └── StoreTest.php.html.twig │ │ │ ├── Search │ │ │ │ └── _Entity_Test.php.html.twig │ │ │ ├── UploaderTest.php.html.twig │ │ │ ├── _Entity_ListRepoTest.php.html.twig │ │ │ ├── _Entity_RepoTest.php.html.twig │ │ │ ├── _Entity_Test.php.html.twig │ │ │ ├── _Entity_UiCollectionProviderTest.php.html.twig │ │ │ └── _Entity_UiManagerTest.php.html.twig │ │ │ ├── Plugin │ │ │ └── Theme │ │ │ │ └── Block │ │ │ │ └── Html │ │ │ │ └── TopmenuPluginTest.php.html.twig │ │ │ ├── Source │ │ │ ├── Catalog │ │ │ │ ├── ProductAttributeSetTest.php.html.twig │ │ │ │ └── ProductAttributeTest.php.html.twig │ │ │ ├── OptionsTest.php.html.twig │ │ │ ├── StoreViewTest.php.html.twig │ │ │ └── _Entity_Test.php.html.twig │ │ │ ├── Ui │ │ │ ├── Component │ │ │ │ └── Listing │ │ │ │ │ ├── ActionsColumnTest.php.html.twig │ │ │ │ │ └── ImageTest.php.html.twig │ │ │ ├── EntityUiConfigTest.php.html.twig │ │ │ ├── Form │ │ │ │ ├── DataModifier │ │ │ │ │ ├── CompositeDataModifierTest.php.html.twig │ │ │ │ │ ├── DynamicRowsTest.php.html.twig │ │ │ │ │ ├── MultiselectTest.php.html.twig │ │ │ │ │ ├── NullModifierTest.php.html.twig │ │ │ │ │ └── UploadTest.php.html.twig │ │ │ │ └── DataProviderTest.php.html.twig │ │ │ └── SaveDataProcessor │ │ │ │ ├── CompositeProcessorTest.php.html.twig │ │ │ │ ├── DateTest.php.html.twig │ │ │ │ ├── DynamicRowsTest.php.html.twig │ │ │ │ ├── MultiselectTest.php.html.twig │ │ │ │ ├── NullProcessorTest.php.html.twig │ │ │ │ └── UploadTest.php.html.twig │ │ │ └── ViewModel │ │ │ ├── Formatter │ │ │ ├── DateTest.php.html.twig │ │ │ ├── FileTest.php.html.twig │ │ │ ├── ImageTest.php.html.twig │ │ │ ├── OptionsTest.php.html.twig │ │ │ ├── TextTest.php.html.twig │ │ │ └── WysiwygTest.php.html.twig │ │ │ ├── FormatterTest.php.html.twig │ │ │ └── _Entity_ │ │ │ ├── List_Entity_Test.php.html.twig │ │ │ ├── UrlTest.php.html.twig │ │ │ └── ViewTest.php.html.twig │ │ ├── Ui │ │ ├── CollectionProviderInterface.php.html.twig │ │ ├── Component │ │ │ └── Listing │ │ │ │ ├── ActionsColumn.php.html.twig │ │ │ │ └── Image.php.html.twig │ │ ├── EntityUiConfig.php.html.twig │ │ ├── EntityUiManagerInterface.php.html.twig │ │ ├── Form │ │ │ ├── DataModifier │ │ │ │ ├── CompositeDataModifier.php.html.twig │ │ │ │ ├── DynamicRows.php.html.twig │ │ │ │ ├── Multiselect.php.html.twig │ │ │ │ ├── NullModifier.php.html.twig │ │ │ │ └── Upload.php.html.twig │ │ │ ├── DataModifierInterface.php.html.twig │ │ │ └── DataProvider.php.html.twig │ │ ├── SaveDataProcessor │ │ │ ├── CompositeProcessor.php.html.twig │ │ │ ├── Date.php.html.twig │ │ │ ├── DynamicRows.php.html.twig │ │ │ ├── Multiselect.php.html.twig │ │ │ ├── NullProcessor.php.html.twig │ │ │ └── Upload.php.html.twig │ │ └── SaveDataProcessorInterface.php.html.twig │ │ ├── ViewModel │ │ ├── Formatter.php.html.twig │ │ ├── Formatter │ │ │ ├── Date.php.html.twig │ │ │ ├── File.php.html.twig │ │ │ ├── FormatterInterface.php.html.twig │ │ │ ├── Image.php.html.twig │ │ │ ├── Options.php.html.twig │ │ │ ├── Text.php.html.twig │ │ │ └── Wysiwyg.php.html.twig │ │ └── _Entity_ │ │ │ ├── List_Entity_.php.html.twig │ │ │ ├── Url.php.html.twig │ │ │ └── View.php.html.twig │ │ ├── composer.json.html.twig │ │ ├── etc │ │ ├── acl.xml.html.twig │ │ ├── adminhtml │ │ │ ├── di.xml.html.twig │ │ │ ├── menu.xml.html.twig │ │ │ ├── routes.xml.html.twig │ │ │ └── system.xml.html.twig │ │ ├── config.xml.html.twig │ │ ├── db_schema.xml.html.twig │ │ ├── di.xml.html.twig │ │ ├── frontend │ │ │ ├── di.xml.html.twig │ │ │ └── routes.xml.html.twig │ │ ├── module.xml.html.twig │ │ └── webapi.xml.html.twig │ │ ├── registration.php.html.twig │ │ └── view │ │ ├── adminhtml │ │ ├── layout │ │ │ ├── _modulename___entity__edit.xml.html.twig │ │ │ └── _modulename___entity__index.xml.html.twig │ │ ├── ui_component │ │ │ ├── _modulename___entity__form.xml.html.twig │ │ │ └── _modulename___entity__listing.xml.html.twig │ │ └── web │ │ │ └── template │ │ │ └── preview.html.html.twig │ │ └── frontend │ │ ├── layout │ │ ├── _modulename___entity__index.xml.html.twig │ │ ├── _modulename___entity__view.xml.html.twig │ │ └── default.xml.html.twig │ │ └── templates │ │ └── _entity_ │ │ ├── list.phtml.html.twig │ │ ├── name.phtml.html.twig │ │ └── view.phtml.html.twig ├── Tests │ └── Unit │ │ └── Model │ │ ├── Attribute │ │ ├── Dynamic │ │ │ └── Type │ │ │ │ ├── BaseTypeTest.php │ │ │ │ ├── ProductAttributeSetTest.php │ │ │ │ └── ProductAttributeTest.php │ │ ├── DynamicTest.php │ │ └── Type │ │ │ ├── BaseTypeTest.php │ │ │ ├── DropdownTest.php │ │ │ ├── DynamicTest.php │ │ │ ├── ProductAttributeSetTest.php │ │ │ └── ProductAttributeTest.php │ │ ├── AttributeTest.php │ │ ├── EntityTest.php │ │ ├── Module │ │ └── FactoryTest.php │ │ └── ModuleTest.php └── UmcMagentoBundle.php ├── ShopwareBundle ├── DependencyInjection │ └── UmcShopwareExtension.php ├── Resources │ ├── config │ │ ├── platform.yml │ │ └── services.xml │ └── public │ │ └── logo │ │ └── shopware.png └── UmcShopwareBundle.php └── SyliusBundle ├── DependencyInjection └── UmcSyliusExtension.php ├── Model └── Entity.php ├── Resources ├── config │ ├── extensible_parameters.yml │ ├── form │ │ ├── attribute.yml │ │ ├── entity.yml │ │ └── module.yml │ ├── platform.yml │ ├── services.xml │ └── source │ │ ├── entity.yml │ │ └── module.yml ├── public │ └── logo │ │ └── sylius.png └── views │ ├── attribute │ ├── grid │ │ ├── date.html.twig │ │ ├── default.html.twig │ │ └── yesno.html.twig │ └── model │ │ ├── decimal.html.twig │ │ ├── default.html.twig │ │ └── yesno.html.twig │ └── source │ ├── config │ ├── packages │ │ └── _namespace___modulename_.yml.html.twig │ └── routes │ │ └── _namespace___modulename_.yml.html.twig │ └── src │ └── _Namespace_ │ └── Bundle │ └── _ModuleName_Bundle │ ├── Entity │ └── _Entity_.php.html.twig │ ├── Menu │ └── AdminMenuListener.php.html.twig │ ├── Resources │ ├── config │ │ ├── _namespace___modulename_.yml.html.twig │ │ ├── doctrine │ │ │ └── _Entity_.orm.xml.html.twig │ │ ├── grid │ │ │ └── _entity_.yml.html.twig │ │ ├── routing.yml.html.twig │ │ └── services.yml.html.twig │ └── translations │ │ └── messages.en.yml.html.twig │ ├── _Namespace__ModuleName_Bundle.php.html.twig │ └── composer.json.html.twig └── UmcSyliusBundle.php /.env.dist: -------------------------------------------------------------------------------- 1 | # This file is a "template" of which env vars need to be defined for your application 2 | # Copy this file to .env file for development, create environment variables when deploying to production 3 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 4 | 5 | ###> symfony/framework-bundle ### 6 | APP_ENV=dev 7 | APP_SECRET=1b27eb0961709954eb282255a09df25b 8 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 9 | #TRUSTED_HOSTS=localhost,example.com 10 | ###< symfony/framework-bundle ### 11 | 12 | ### > docker config 13 | DOCKER_WEB_PORT=80 14 | DOCKER_CONTAINER_NAME=umc 15 | DOCKER_UMC_URL=umc.me 16 | DOCKER_IMAGE=umc 17 | ### < docker config 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | ###> symfony/framework-bundle ### 3 | /.env 4 | /public/bundles/ 5 | /bundles/ 6 | /var/ 7 | /vendor/ 8 | ###< symfony/framework-bundle ### 9 | 10 | ###> symfony/phpunit-bridge ### 11 | .phpunit 12 | /phpunit.xml 13 | symfony.lock 14 | ###< symfony/phpunit-bridge ### 15 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Options -MultiViews 3 | RewriteEngine On 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteRule ^(.*)$ index.php [QSA,L] 6 | 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.3.0-apache 2 | 3 | # Set working directory 4 | WORKDIR /var/www 5 | 6 | # Install System Dependencies 7 | RUN apt-get update 8 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 9 | software-properties-common 10 | RUN apt-get update 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ 12 | libfreetype6-dev \ 13 | libicu-dev \ 14 | libssl-dev \ 15 | libjpeg62-turbo-dev \ 16 | libmcrypt-dev \ 17 | libedit-dev \ 18 | libzip-dev \ 19 | libedit2 \ 20 | libxslt1-dev \ 21 | libonig-dev \ 22 | apt-utils \ 23 | gnupg \ 24 | vim \ 25 | wget \ 26 | curl \ 27 | unzip \ 28 | tar 29 | 30 | # Install extensions 31 | RUN docker-php-ext-configure \ 32 | gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/; \ 33 | docker-php-ext-install \ 34 | zip 35 | 36 | # Install composer 37 | RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 38 | 39 | ENV PATH="/var/www/.composer/vendor/bin/:${PATH}" 40 | 41 | WORKDIR /var/www/html 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Marius Strajeru 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include .env 2 | all: help 3 | 4 | help: 5 | @echo "Usage: make ";\ 6 | echo "Commands: ";\ 7 | echo " help: Shows the help. Exactly what you see now";\ 8 | echo " install: Recreate container";\ 9 | echo " uninstall: Destroy container";\ 10 | echo " reinstall: Uninstall and install the application ";\ 11 | echo " start: Start all containers";\ 12 | echo " stop: Stop all containers";\ 13 | echo " ssh: Get cli access to apache container";\ 14 | 15 | install: hosts container composer assets 16 | uninstall: hosts-clean container-clean 17 | reinstall: uninstall install 18 | start: 19 | @docker-compose start 20 | stop: 21 | @docker-compose stop || true 22 | ssh: 23 | @docker exec -it $(DOCKER_CONTAINER_NAME) bash 24 | hosts: 25 | @sudo -- sh -c -e "echo '127.0.0.1 $(DOCKER_UMC_URL)' >> /etc/hosts"; 26 | hosts-clean: 27 | @sudo sed -i".bak" "/$(DOCKER_UMC_URL)/d" /etc/hosts 28 | container: 29 | $(info creating container) 30 | docker-compose up -d 31 | container-clean: 32 | $(info removing container) 33 | @docker rm $(DOCKER_CONTAINER_NAME) -f 34 | image-clean: 35 | $(info removing image) 36 | @docker rmi $(DOCKER_IMAGE) -f 37 | composer: 38 | $(info running composer install) 39 | @docker exec -it $(DOCKER_CONTAINER_NAME) composer install || true 40 | assets: 41 | @docker exec -it $(DOCKER_CONTAINER_NAME) bin/console assets:install 42 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | load(__DIR__.'/../.env'); 23 | } 24 | 25 | $input = new ArgvInput(); 26 | $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); 27 | $debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); 28 | 29 | if ($debug) { 30 | umask(0000); 31 | 32 | if (class_exists(Debug::class)) { 33 | Debug::enable(); 34 | } 35 | } 36 | 37 | $kernel = new Kernel($env, $debug); 38 | $application = new Application($kernel); 39 | $application->run($input); 40 | -------------------------------------------------------------------------------- /bin/phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | ['all' => true], 5 | Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], 6 | Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], 7 | Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], 8 | App\Umc\CoreBundle\UmcCoreBundle::class => ['all' => true], 9 | App\Umc\MagentoBundle\UmcMagentoBundle::class => ['all' => true], 10 | App\Umc\ShopwareBundle\UmcShopwareBundle::class => ['all' => true], 11 | App\Umc\SyliusBundle\UmcSyliusBundle::class => ['all' => true], 12 | ]; 13 | -------------------------------------------------------------------------------- /config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: true 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { only_exceptions: false } 7 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | secret: '%env(APP_SECRET)%' 3 | #default_locale: en 4 | #csrf_protection: true 5 | #http_method_override: true 6 | 7 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 8 | # Remove or comment this section to explicitly disable session support. 9 | session: 10 | handler_id: ~ 11 | 12 | #esi: true 13 | #fragments: true 14 | php_errors: 15 | log: true 16 | 17 | cache: 18 | # Put the unique name of your app here: the prefix seed 19 | # is used to compute stable namespaces for cache keys. 20 | #prefix_seed: your_vendor_name/app_name 21 | 22 | # The app cache caches to the filesystem by default. 23 | # Other options include: 24 | 25 | # Redis 26 | #app: cache.adapter.redis 27 | #default_redis_provider: redis://localhost 28 | 29 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 30 | #app: cache.adapter.apcu 31 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: ~ 4 | -------------------------------------------------------------------------------- /config/packages/sensio_framework_extra.yaml: -------------------------------------------------------------------------------- 1 | sensio_framework_extra: 2 | router: 3 | annotations: false 4 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/packages/test/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: false 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { collect: false } 7 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | debug: '%kernel.debug%' 3 | strict_variables: '%kernel.debug%' 4 | -------------------------------------------------------------------------------- /config/packages/twig_extensions.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | public: false 4 | autowire: true 5 | autoconfigure: true 6 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | kernel: 2 | resource: ../../src/Kernel.php 3 | type: annotation 4 | 5 | umc_core: 6 | resource: ../../src/Umc/CoreBundle/Controller/ 7 | type: annotation 8 | -------------------------------------------------------------------------------- /config/routes/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler_wdt: 2 | resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' 3 | prefix: /_wdt 4 | 5 | web_profiler_profiler: 6 | resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' 7 | prefix: /_profiler 8 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | www: 4 | container_name: $DOCKER_CONTAINER_NAME 5 | image: $DOCKER_IMAGE 6 | build: . 7 | ports: 8 | - "$DOCKER_WEB_PORT:80" 9 | volumes: 10 | - .:/var/www/html/ 11 | volumes: 12 | persistent: 13 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | bootEnv(__DIR__.'/.env'); 14 | 15 | if ($_SERVER['APP_DEBUG']) { 16 | umask(0000); 17 | 18 | Debug::enable(); 19 | } 20 | 21 | if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { 22 | Request::setTrustedProxies( 23 | explode(',', $trustedProxies), 24 | Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST 25 | ); 26 | } 27 | 28 | if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { 29 | Request::setTrustedHosts([$trustedHosts]); 30 | } 31 | 32 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 33 | $request = Request::createFromGlobals(); 34 | $response = $kernel->handle($request); 35 | $response->send(); 36 | $kernel->terminate($request, $response); 37 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/FileLoader.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config; 22 | 23 | use Symfony\Component\Yaml\Yaml; 24 | 25 | class FileLoader 26 | { 27 | /** 28 | * @param $file 29 | * @return array 30 | * @throws \Exception 31 | */ 32 | public function load($file): array 33 | { 34 | try { 35 | $values = Yaml::parseFile($file, 1); 36 | } catch (\Exception $e) { 37 | throw new \Exception(sprintf('Could not load file %s: %s', $file, $e->getMessage())); 38 | } 39 | return $values; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/Form/Modifier/Tab.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | namespace App\Umc\CoreBundle\Config\Form\Modifier; 20 | 21 | use App\Umc\CoreBundle\Config\Modifier\ModifierInterface; 22 | 23 | class Tab implements ModifierInterface 24 | { 25 | /** 26 | * @param array $config 27 | * @return array 28 | */ 29 | public function modify(array $config): array 30 | { 31 | foreach ($config as $type => $item) { 32 | foreach ($item['fields'] ?? [] as $key => $field) { 33 | $tab = $field['tab'] ?? ''; 34 | if (isset($item['tabs'][$tab])) { 35 | $item['tabs'][$tab]['fields'] = $item['tabs'][$tab]['fields'] ?? []; 36 | $item['tabs'][$tab]['fields'][$key] = $field; 37 | } 38 | } 39 | unset($item['fields']); 40 | $config[$type] = $item; 41 | } 42 | return $config; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/Modifier/ModifierInterface.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config\Modifier; 22 | 23 | interface ModifierInterface 24 | { 25 | /** 26 | * @param array $config 27 | * @return array 28 | */ 29 | public function modify(array $config): array; 30 | } 31 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/Modifier/Parameter.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config\Modifier; 22 | 23 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; 24 | 25 | class Parameter implements ModifierInterface 26 | { 27 | /** 28 | * @var ParameterBagInterface 29 | */ 30 | private $parameterBag; 31 | 32 | /** 33 | * Parameter constructor. 34 | * @param ParameterBagInterface $parameterBag 35 | */ 36 | public function __construct(ParameterBagInterface $parameterBag) 37 | { 38 | $this->parameterBag = $parameterBag; 39 | } 40 | 41 | /** 42 | * @param array $config 43 | * @return array 44 | */ 45 | public function modify(array $config): array 46 | { 47 | return $this->parameterBag->resolveValue($config); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/ProcessorFactory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config; 22 | 23 | use Symfony\Component\Config\Definition\Processor; 24 | 25 | class ProcessorFactory 26 | { 27 | /** 28 | * @return Processor 29 | */ 30 | public function create(): Processor 31 | { 32 | return new Processor(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/Provider.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config; 22 | 23 | class Provider 24 | { 25 | /** 26 | * @var FileLoader 27 | */ 28 | private $loader; 29 | /** 30 | * @var string 31 | */ 32 | private $file; 33 | 34 | /** 35 | * Provider constructor. 36 | * @param FileLoader $loader 37 | * @param string $file 38 | */ 39 | public function __construct(FileLoader $loader, string $file) 40 | { 41 | $this->loader = $loader; 42 | $this->file = $file; 43 | } 44 | 45 | /** 46 | * @return array 47 | * @throws \Exception 48 | */ 49 | public function getConfig(): array 50 | { 51 | return $this->loader->load($this->file); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Config/Provider/Factory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Config\Provider; 22 | 23 | use App\Umc\CoreBundle\Config\FileLoader; 24 | use App\Umc\CoreBundle\Config\Provider; 25 | 26 | class Factory 27 | { 28 | /** 29 | * @var FileLoader 30 | */ 31 | private $fileLoader; 32 | 33 | /** 34 | * Factory constructor. 35 | * @param FileLoader $fileLoader 36 | */ 37 | public function __construct(FileLoader $fileLoader) 38 | { 39 | $this->fileLoader = $fileLoader; 40 | } 41 | 42 | /** 43 | * @param string $file 44 | * @return Provider 45 | */ 46 | public function create(string $file) 47 | { 48 | return new Provider($this->fileLoader, $file); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Controller/HelpController.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Controller; 22 | 23 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; 24 | use Symfony\Component\HttpFoundation\Response; 25 | use Symfony\Component\Routing\Annotation\Route; 26 | 27 | class HelpController extends AbstractController 28 | { 29 | /** 30 | * @Route("/help", methods={"GET"}, name="help") 31 | * @return Response 32 | */ 33 | public function run(): Response 34 | { 35 | return $this->render('@UmcCore/help.html.twig'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Controller/IndexController.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Controller; 22 | 23 | use App\Umc\CoreBundle\Model\Platform; 24 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; 25 | use Symfony\Component\HttpFoundation\Response; 26 | use Symfony\Component\Routing\Annotation\Route; 27 | 28 | class IndexController extends AbstractController 29 | { 30 | /** 31 | * @var Platform\Pool 32 | */ 33 | private $pool; 34 | 35 | /** 36 | * PlatformController constructor. 37 | * @param Platform\Pool $pool 38 | */ 39 | public function __construct(Platform\Pool $pool) 40 | { 41 | $this->pool = $pool; 42 | } 43 | 44 | /** 45 | * @Route("/", methods={"GET"}, name="index") 46 | * @return Response 47 | */ 48 | public function run(): Response 49 | { 50 | return $this->render('@UmcCore/index.html.twig', ['platforms' => $this->pool->getPlatforms()]); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Attribute/Dynamic/Option/Factory.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Model\Attribute\Dynamic\Option; 23 | 24 | use App\Umc\CoreBundle\Model\Attribute\Dynamic; 25 | use App\Umc\CoreBundle\Model\Attribute\Dynamic\Option; 26 | 27 | class Factory 28 | { 29 | /** 30 | * @param Dynamic $field 31 | * @param array $data 32 | * @return Option 33 | */ 34 | public function create(Dynamic $field, array $data = []): Option 35 | { 36 | return new Option($field, $data); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Attribute/Option/Factory.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Model\Attribute\Option; 23 | 24 | use App\Umc\CoreBundle\Model\Attribute; 25 | use App\Umc\CoreBundle\Model\Attribute\Option; 26 | 27 | class Factory 28 | { 29 | /** 30 | * @param Attribute $attribute 31 | * @param array $data 32 | * @return Option 33 | */ 34 | public function create(Attribute $attribute, array $data = []): Option 35 | { 36 | return new Option($attribute, $data); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Platform/ConfigException.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Model\Platform; 22 | 23 | class ConfigException extends \Exception 24 | { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Platform/Factory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Model\Platform; 22 | 23 | use App\Umc\CoreBundle\Model\Platform; 24 | 25 | class Factory 26 | { 27 | /** 28 | * @param array $data 29 | * @param Version[] $versions 30 | * @return Platform 31 | */ 32 | public function create(array $data, array $versions): Platform 33 | { 34 | return new Platform($data['code'] ?? '', $data, $versions); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Platform/Version/Factory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Model\Platform\Version; 22 | 23 | use App\Umc\CoreBundle\Model\Platform\Version; 24 | 25 | class Factory 26 | { 27 | /** 28 | * @param string $code 29 | * @param array $data 30 | * @return Version 31 | */ 32 | public function create(string $code, array $data): Version 33 | { 34 | return new Version($code, $data); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Model/Relation/Factory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Model\Relation; 22 | 23 | use App\Umc\CoreBundle\Model\Module; 24 | use App\Umc\CoreBundle\Model\Relation; 25 | use App\Umc\CoreBundle\Util\StringUtil; 26 | 27 | class Factory 28 | { 29 | /** 30 | * @var StringUtil 31 | */ 32 | private $stringUtil; 33 | 34 | /** 35 | * Factory constructor. 36 | * @param StringUtil $stringUtil 37 | */ 38 | public function __construct(StringUtil $stringUtil) 39 | { 40 | $this->stringUtil = $stringUtil; 41 | } 42 | 43 | /** 44 | * @param Module $module 45 | * @param array $data 46 | * @return Relation 47 | */ 48 | public function create(Module $module, array $data): Relation 49 | { 50 | return new Relation($module, $this->stringUtil, $data); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Repository/Settings/MissingSettingsFileException.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Repository\Settings; 22 | 23 | class MissingSettingsFileException extends \Exception 24 | { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/config/form/option.yml: -------------------------------------------------------------------------------- 1 | option: 2 | code: option 3 | settings_label: "Option Default Settings" 4 | panel: 5 | fields: 6 | - 7 | field: label 8 | default: New Option 9 | children: [] 10 | tabs: 11 | - 12 | label: Settings 13 | code: base 14 | sort_order: 10 15 | cols: 4 16 | fields: 17 | - 18 | name: value 19 | type: text 20 | label: Option value 21 | title: "Value saved in the db" 22 | dataValidation: validate_required 23 | tab: base 24 | sort_order: 10 25 | - 26 | name: label 27 | type: text 28 | label: Label 29 | title: Value displayed in frontend and in the dropdown 30 | dataValidation: validate_required 31 | tab: base 32 | - 33 | name: default_radio 34 | type: checkbox 35 | label: "Default" 36 | title: "Default" 37 | containerAttributes: "data-bind=\"visible: $parent.data.type() === 'dropdown'\"" 38 | additionalDataBind: "click: function (value) {return $parent.radioChange(value, '_option', 'default_radio')}" 39 | tab: base 40 | - 41 | name: default_checkbox 42 | type: checkbox 43 | label: "Default" 44 | title: "Default" 45 | containerAttributes: "data-bind=\"visible: $parent.data.type() === 'multiselect'\"" 46 | tab: base 47 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/font-awesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.eot -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.ttf -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.woff -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/font/jquery-ui.woff2 -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_20_555555_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_20_555555_1x400.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_40_0078a3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_40_0078a3_1x400.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_40_ffc73d_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_glass_40_ffc73d_1x400.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_gloss-wave_25_333333_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_gloss-wave_25_333333_500x100.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_inset-soft_25_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_inset-soft_25_000000_1x100.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_inset-soft_30_f58400_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-bg_inset-soft_30_f58400_1x100.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_4b8e0b_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_4b8e0b_256x240.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_a83300_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_a83300_256x240.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_cccccc_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_cccccc_256x240.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Resources/public/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/jquery/jquery.ajax-progress.js: -------------------------------------------------------------------------------- 1 | (function($, window, undefined) { 2 | //is onprogress supported by browser? 3 | var hasOnProgress = ("onprogress" in $.ajaxSettings.xhr()); 4 | 5 | //If not supported, do nothing 6 | if (!hasOnProgress) { 7 | return; 8 | } 9 | 10 | //patch ajax settings to call a progress callback 11 | var oldXHR = $.ajaxSettings.xhr; 12 | $.ajaxSettings.xhr = function() { 13 | var xhr = oldXHR.apply(this, arguments); 14 | if(xhr instanceof window.XMLHttpRequest) { 15 | xhr.addEventListener('progress', this.progress, false); 16 | } 17 | 18 | if(xhr.upload) { 19 | xhr.upload.addEventListener('progress', this.progress, false); 20 | } 21 | 22 | return xhr; 23 | }; 24 | })(jQuery, window); 25 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/umc/dark-mode.js: -------------------------------------------------------------------------------- 1 | /* 2 | * UMC 3 | * 4 | * NOTICE OF LICENSE 5 | * 6 | * This source file is subject to the MIT License 7 | * that is bundled with this package in the file LICENSE.txt. 8 | * It is also available through the world-wide-web at this URL: 9 | * http://opensource.org/licenses/mit-license.php 10 | * 11 | * @copyright Marius Strajeru 12 | * @license http://opensource.org/licenses/mit-license.php MIT License 13 | * @author Marius Strajeru 14 | * 15 | */ 16 | 17 | $.widget('umc.dark', { 18 | _create: function () { 19 | var self = this; 20 | $(this.element).prop('checked', localStorage.getItem('dark-mode')); 21 | this.setMode(); 22 | $(this.element).on('change', function () { 23 | self.setMode(); 24 | }); 25 | }, 26 | setMode: function () { 27 | var mode = $(this.element).prop('checked'); 28 | if (mode) { 29 | $('body').addClass('umc-dark'); 30 | localStorage.setItem('dark-mode', mode); 31 | } else { 32 | $('body').removeClass('umc-dark'); 33 | localStorage.removeItem('dark-mode'); 34 | } 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/public/umc/info.js: -------------------------------------------------------------------------------- 1 | /* 2 | * UMC 3 | * 4 | * NOTICE OF LICENSE 5 | * 6 | * This source file is subject to the MIT License 7 | * that is bundled with this package in the file LICENSE.txt. 8 | * It is also available through the world-wide-web at this URL: 9 | * http://opensource.org/licenses/mit-license.php 10 | * 11 | * @copyright Marius Strajeru 12 | * @license http://opensource.org/licenses/mit-license.php MIT License 13 | * @author Marius Strajeru 14 | * 15 | */ 16 | 17 | ko.bindingHandlers.umcinfo = { 18 | init: function (el, valueAccessor, allBindingsAccessor, viewModel) { 19 | let allBindings = allBindingsAccessor().umcinfo || {}; 20 | $(el).on('click', function () { 21 | let modal = $('[role=dialog]:first'); 22 | modal.find('.modal-title').html(allBindings.title || '') 23 | modal.find('.modal-body').html(allBindings.content || '') 24 | modal.modal('show'); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/elements/validation.html.twig: -------------------------------------------------------------------------------- 1 | {% if element.required is defined and element.required %} required="required" {% endif %} 2 | {% if element.dataValidation is defined %} data-validation="{{ element.dataValidation }}" {% endif %} 3 | {% if element.dataValidationRegexp is defined %} data-validation-regexp="{{ element.dataValidationRegexp }}" {% endif %} 4 | {% if element.dataValidationErrorMsg is defined %} data-validation-error-msg="{{ element.dataValidationErrorMsg }}" {% endif %} 5 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/field/checkbox.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% if element.title is defined %} 4 | 5 | {% endif %} 6 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/field/radio.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/field/text.html.twig: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | 17 | {% if element.title is defined %} 18 |
19 |
20 | 21 |
22 |
23 | {% endif %} 24 |
25 |
26 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/field/textarea.html.twig: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | 16 | {% if element.title is defined %} 17 |
18 |
19 | 20 |
21 |
22 | {% endif %} 23 |
24 |
25 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/edit/form/field/validation.html.twig: -------------------------------------------------------------------------------- 1 | {% if element.required is defined and element.required %} required="required" {% endif %} 2 | {% if element.dataValidation is defined %} data-validation="{{ element.dataValidation }}" {% endif %} 3 | {% if element.dataValidationRegexp is defined %} data-validation-regexp="{{ element.dataValidationRegexp }}" {% endif %} 4 | {% if element.dataValidationErrorMsg is defined %} data-validation-error-msg="{{ element.dataValidationErrorMsg }}" {% endif %} 5 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/index/menu.html.twig: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/modal.html.twig: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Resources/views/settings/form.html.twig: -------------------------------------------------------------------------------- 1 |
3 |
4 | {% set index = 0 %} 5 | {% for name, field in form.fields %} 6 | {% if index is divisible by (4) %} 7 | {% if index != 0 %} 8 |
9 | {% endif %} 10 |
11 | {% endif %} 12 |
13 | {% set fieldName = formKey ~ '.' ~ field.name %} 14 | {% set field = field|merge({'name': fieldName, 'additionalDataBind': 'disable: data.restore.restore', 'containerAttributes': ''}) %} 15 | {% include field.template with {element: field} %} 16 |
17 | {% set index = index + 1 %} 18 | {% endfor %} 19 |
20 |
21 | 22 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Cs/ProcessFactory.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Service\Cs; 23 | 24 | use Symfony\Component\Process\Process; 25 | 26 | class ProcessFactory 27 | { 28 | /** 29 | * @param array $data 30 | * @return Process 31 | */ 32 | public function create(array $data): Process 33 | { 34 | return new Process($data); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/FileFinderFactory.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service; 22 | 23 | use Symfony\Component\Finder\Finder; 24 | 25 | class FileFinderFactory 26 | { 27 | /** 28 | * @return Finder 29 | */ 30 | public function create(): Finder 31 | { 32 | return new Finder(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Generator/GeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service\Generator; 22 | 23 | use App\Umc\CoreBundle\Model\Module; 24 | 25 | interface GeneratorInterface 26 | { 27 | /** 28 | * @param Module $module 29 | * @param array $fileConfig 30 | * @param array $vars 31 | * @return array 32 | */ 33 | public function generateContent(Module $module, array $fileConfig, array $vars = []): array; 34 | } 35 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Locator.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service; 22 | 23 | use Symfony\Component\DependencyInjection\ContainerInterface; 24 | 25 | class Locator 26 | { 27 | /** 28 | * @var ContainerInterface 29 | */ 30 | private $container; 31 | 32 | /** 33 | * Locator constructor. 34 | * @param ContainerInterface $container 35 | */ 36 | public function __construct(ContainerInterface $container) 37 | { 38 | $this->container = $container; 39 | } 40 | 41 | /** 42 | * @param $id 43 | * @return object|null 44 | */ 45 | public function getService($id) 46 | { 47 | return $this->container->get($id); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Validator/EntityName.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service\Validator; 22 | 23 | use App\Umc\CoreBundle\Model\Entity; 24 | 25 | class EntityName implements ValidatorInterface 26 | { 27 | /** 28 | * @param object $object 29 | * @return array 30 | */ 31 | public function validate($object): array 32 | { 33 | $errors = []; 34 | if (!$object instanceof Entity) { 35 | throw new \InvalidArgumentException("Entity Name Validator can be used for Entities only"); 36 | } 37 | if ($object->getNameAttribute() === null) { 38 | $errors[] = "Entity {$object->getLabelSingular()} must have an attribute that behaves as name"; 39 | } 40 | return $errors; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Validator/ValidationException.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service\Validator; 22 | 23 | class ValidationException extends \Exception 24 | { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/Validator/ValidatorInterface.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Service\Validator; 22 | 23 | interface ValidatorInterface 24 | { 25 | /** 26 | * @param object $object 27 | * @return string[] 28 | */ 29 | public function validate($object): array; 30 | } 31 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Service/ZipArchiveFactory.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Service; 23 | 24 | class ZipArchiveFactory 25 | { 26 | /** 27 | * @return \ZipArchive 28 | */ 29 | public function create(): \ZipArchive 30 | { 31 | return new \ZipArchive(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Config/Modifier/ParameterTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Config\Modifier; 22 | 23 | use App\Umc\CoreBundle\Config\Modifier\Parameter; 24 | use PHPUnit\Framework\TestCase; 25 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; 26 | 27 | class ParameterTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Config\Modifier\Parameter::modify 31 | * @covers \App\Umc\CoreBundle\Config\Modifier\Parameter::__construct 32 | */ 33 | public function testModify() 34 | { 35 | $parameterBag = $this->createMock(ParameterBagInterface::class); 36 | $parameterBag->expects($this->once())->method('resolveValue')->with(['config'])->willReturn(['resolved']); 37 | $parameter = new Parameter($parameterBag); 38 | $this->assertEquals(['resolved'], $parameter->modify(['config'])); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Config/ProcessorFactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Config; 22 | 23 | use App\Umc\CoreBundle\Config\ProcessorFactory; 24 | use PHPUnit\Framework\TestCase; 25 | use Symfony\Component\Config\Definition\Processor; 26 | 27 | class ProcessorFactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Config\ProcessorFactory::create 31 | */ 32 | public function testCreate() 33 | { 34 | $factory = new ProcessorFactory(); 35 | $this->assertInstanceOf(Processor::class, $factory->create()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Config/Provider/FactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Config\Provider; 22 | 23 | use App\Umc\CoreBundle\Config\FileLoader; 24 | use App\Umc\CoreBundle\Config\Provider; 25 | use PHPUnit\Framework\TestCase; 26 | 27 | class FactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Config\Provider\Factory::create 31 | * @covers \App\Umc\CoreBundle\Config\Provider\Factory::__construct 32 | */ 33 | public function testCreate() 34 | { 35 | $loader = $this->createMock(FileLoader::class); 36 | $factory = new Provider\Factory($loader); 37 | $this->assertInstanceOf(Provider::class, $factory->create('file')); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Config/ProviderTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Config; 22 | 23 | use App\Umc\CoreBundle\Config\FileLoader; 24 | use App\Umc\CoreBundle\Config\Provider; 25 | use PHPUnit\Framework\TestCase; 26 | 27 | class ProviderTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Config\Provider::getConfig 31 | * @covers \App\Umc\CoreBundle\Config\Provider::__construct 32 | */ 33 | public function testGetConfig() 34 | { 35 | $loader = $this->createMock(FileLoader::class); 36 | $provider = new Provider($loader, 'file'); 37 | $loader->method('load')->with('file')->willReturn(['content']); 38 | $this->assertEquals(['content'], $provider->getConfig()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Model/Platform/FactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Model\Platform; 22 | 23 | use App\Umc\CoreBundle\Model\Platform; 24 | use App\Umc\CoreBundle\Model\Platform\Factory; 25 | use PHPUnit\Framework\TestCase; 26 | 27 | class FactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Model\Platform\Factory::create 31 | */ 32 | public function testCreate() 33 | { 34 | $factory = new Factory(); 35 | $this->assertInstanceOf(Platform::class, $factory->create([], [])); 36 | $this->assertInstanceOf(Platform::class, $factory->create(['code' => 'code'], [])); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Model/Platform/Version/FactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Model\Platform\Version; 22 | 23 | use App\Umc\CoreBundle\Model\Platform\Version; 24 | use App\Umc\CoreBundle\Model\Platform\Version\Factory; 25 | use PHPUnit\Framework\TestCase; 26 | 27 | class FactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Model\Platform\Version\Factory::create 31 | */ 32 | public function testCreate() 33 | { 34 | $factory = new Factory(); 35 | $this->assertInstanceOf(Version::class, $factory->create('code', [])); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Model/Relation/FactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Model\Relation; 22 | 23 | use App\Umc\CoreBundle\Model\Module; 24 | use App\Umc\CoreBundle\Model\Relation; 25 | use App\Umc\CoreBundle\Util\StringUtil; 26 | use PHPUnit\Framework\MockObject\MockObject; 27 | use PHPUnit\Framework\TestCase; 28 | 29 | class FactoryTest extends TestCase 30 | { 31 | /** 32 | * @covers \App\Umc\CoreBundle\Model\Relation\Factory::create 33 | * @covers \App\Umc\CoreBundle\Model\Relation\Factory::__construct 34 | */ 35 | public function testCreate() 36 | { 37 | $stringUtil = $this->createMock(StringUtil::class); 38 | /** @var Module | MockObject $module */ 39 | $module = $this->createMock(Module::class); 40 | $factory = new Relation\Factory($stringUtil); 41 | $this->assertInstanceOf(Relation::class, $factory->create($module, [])); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Service/Cs/ProcessFactoryTest.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Tests\Unit\Service\Cs; 23 | 24 | use App\Umc\CoreBundle\Service\Cs\ProcessFactory; 25 | use PHPUnit\Framework\TestCase; 26 | use Symfony\Component\Process\Process; 27 | 28 | class ProcessFactoryTest extends TestCase 29 | { 30 | /** 31 | * @covers \App\Umc\CoreBundle\Service\Cs\ProcessFactory::create 32 | */ 33 | public function testCreate() 34 | { 35 | $factory = new ProcessFactory(); 36 | $this->assertInstanceOf(Process::class, $factory->create(['dummy'])); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Service/FinderFactoryTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit\Service; 22 | 23 | use App\Umc\CoreBundle\Service\FileFinderFactory; 24 | use PHPUnit\Framework\TestCase; 25 | use Symfony\Component\Finder\Finder; 26 | 27 | class FinderFactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Service\FileFinderFactory::create() 31 | */ 32 | public function testCreate() 33 | { 34 | $factory = new FileFinderFactory(); 35 | $finder1 = $factory->create(); 36 | $finder2 = $factory->create(); 37 | $this->assertNotSame($finder1, $finder2); 38 | $this->assertInstanceOf(Finder::class, $finder1); 39 | $this->assertInstanceOf(Finder::class, $finder1); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/Service/ZipArchiveFactoryTest.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle\Tests\Unit\Service; 23 | 24 | use App\Umc\CoreBundle\Service\ZipArchiveFactory; 25 | use PHPUnit\Framework\TestCase; 26 | 27 | class ZipArchiveFactoryTest extends TestCase 28 | { 29 | /** 30 | * @covers \App\Umc\CoreBundle\Service\ZipArchiveFactory::create() 31 | */ 32 | public function testCreate() 33 | { 34 | $factory = new ZipArchiveFactory(); 35 | $this->assertInstanceOf(\ZipArchive::class, $factory->create()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/VersionTest.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Tests\Unit; 22 | 23 | use App\Umc\CoreBundle\Version; 24 | use PHPUnit\Framework\TestCase; 25 | 26 | class VersionTest extends TestCase 27 | { 28 | /** 29 | * @covers \App\Umc\CoreBundle\Version::getVersion() 30 | */ 31 | public function testGetVersion() 32 | { 33 | $this->assertStringStartsWith('4.', Version::getVersion()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/_fixtures/download.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/CoreBundle/Tests/Unit/_fixtures/download.zip -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/_fixtures/yaml/not-valid.yml: -------------------------------------------------------------------------------- 1 | dummy1: 2 | var1: val1 3 | var2: val2 4 | 5 | dummy1: val3 6 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Tests/Unit/_fixtures/yaml/valid.yml: -------------------------------------------------------------------------------- 1 | dummy1: 2 | var1: val1 3 | var2: val2 4 | 5 | dummy2: val3 6 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Twig/License.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Twig; 22 | 23 | use App\Umc\CoreBundle\Service\License\Pool; 24 | use Twig\Extension\AbstractExtension; 25 | use Twig\TwigFunction; 26 | 27 | class License extends AbstractExtension 28 | { 29 | /** 30 | * @var Pool 31 | */ 32 | private $pool; 33 | 34 | /** 35 | * License constructor. 36 | * @param Pool $pool 37 | */ 38 | public function __construct(Pool $pool) 39 | { 40 | $this->pool = $pool; 41 | } 42 | 43 | /** 44 | * @return array|TwigFunction[] 45 | */ 46 | public function getFunctions() 47 | { 48 | return [ 49 | new TwigFunction( 50 | 'formatLicense', 51 | function ($license, $type) { 52 | return $this->pool->process($license, $type); 53 | } 54 | ) 55 | ]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/UmcCoreBundle.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle; 23 | 24 | use Symfony\Component\DependencyInjection\ContainerBuilder; 25 | use Symfony\Component\HttpKernel\Bundle\Bundle; 26 | 27 | class UmcCoreBundle extends Bundle 28 | { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Util/Sorter.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\CoreBundle\Util; 22 | 23 | class Sorter 24 | { 25 | public const DEFAULT_SORT_ORDER_KEY = 'sort_order'; 26 | public const DEFAULT_SORT_ORDER_VALUE = 0; 27 | /** 28 | * @param array $items 29 | * @param string $key 30 | * @param int $default 31 | * @param bool $decreasing 32 | * @return array 33 | */ 34 | public function sort( 35 | array $items, 36 | string $key = self::DEFAULT_SORT_ORDER_KEY, 37 | int $default = self::DEFAULT_SORT_ORDER_VALUE, 38 | bool $decreasing = false 39 | ): array { 40 | uasort( 41 | $items, 42 | function ($itemA, $itemB) use ($key, $default) { 43 | $valueA = $itemA[$key] ?? $default; 44 | $valueB = $itemB[$key] ?? $default; 45 | return $valueA <=> $valueB; 46 | } 47 | ); 48 | return ($decreasing) ? array_reverse($items, true) : $items; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Umc/CoreBundle/Version.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\CoreBundle; 23 | 24 | class Version 25 | { 26 | public const VERSION = '4.3.6'; 27 | public const BUILD = ''; 28 | 29 | /** 30 | * @return string 31 | */ 32 | public static function getVersion(): string 33 | { 34 | return self::VERSION . ((self::BUILD) ? '-' . self::BUILD : ''); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Dynamic.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute; 22 | 23 | class Dynamic extends \App\Umc\CoreBundle\Model\Attribute\Dynamic 24 | { 25 | /** 26 | * @return string 27 | */ 28 | public function getOptionSourceVirtualType(): string 29 | { 30 | $parts = [ 31 | $this->getAttribute()->getEntity()->getModule()->getModuleName(), 32 | $this->getAttribute()->getEntity()->getNameSingular(), 33 | 'Source', 34 | $this->getAttribute()->getCode(), 35 | $this->getCode() 36 | ]; 37 | return $this->stringUtil->glueClassParts($parts, ''); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Dynamic/Type/BaseType.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Dynamic\Type; 22 | 23 | /** 24 | * @method getDynamic() : Dynamic 25 | */ 26 | class BaseType extends \App\Umc\CoreBundle\Model\Attribute\Dynamic\Type\BaseType 27 | { 28 | /** 29 | * @return string 30 | */ 31 | public function getSourceModel(): string 32 | { 33 | return $this->sourceModel ?? $this->getDynamic()->getOptionSourceVirtualType(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Dynamic/Type/ProductAttribute.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Dynamic\Type; 22 | 23 | /** 24 | * @method getDynamic() : Dynamic 25 | */ 26 | class ProductAttribute extends BaseType 27 | { 28 | /** 29 | * @return string 30 | */ 31 | public function getSourceModel(): string 32 | { 33 | $module = $this->getDynamic()->getAttribute()->getEntity()->getModule(); 34 | $parts = [ 35 | $module->getUmcCrudNamespace(), 36 | $module->getUmcModuleName(), 37 | 'Source', 38 | 'Catalog', 39 | 'ProductAttribute' 40 | ]; 41 | return implode('\\', $parts); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Dynamic/Type/ProductAttributeSet.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Dynamic\Type; 22 | 23 | use App\Umc\MagentoBundle\Model\Attribute; 24 | use App\Umc\MagentoBundle\Model\Entity; 25 | 26 | /** 27 | * @method getDynamic() : Dynamic 28 | */ 29 | class ProductAttributeSet extends BaseType 30 | { 31 | /** 32 | * @return string 33 | */ 34 | public function getSourceModel(): string 35 | { 36 | $dynamic = $this->getDynamic(); 37 | /** @var Attribute $attribute */ 38 | $attribute = $dynamic->getAttribute(); 39 | /** @var Entity $entity */ 40 | $entity = $attribute->getEntity(); 41 | $module = $entity->getModule(); 42 | $parts = [ 43 | $module->getUmcCrudNamespace(), 44 | $module->getUmcModuleName(), 45 | 'Source', 46 | 'Catalog', 47 | 'ProductAttributeSet' 48 | ]; 49 | return implode('\\', $parts); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Type/BaseType.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Type; 22 | 23 | use App\Umc\MagentoBundle\Model\Attribute; 24 | 25 | /** 26 | * @method getAttribute(): Attribute 27 | */ 28 | class BaseType extends \App\Umc\CoreBundle\Model\Attribute\Type\BaseType 29 | { 30 | /** 31 | * @return string 32 | */ 33 | public function getSourceModel(): string 34 | { 35 | return $this->sourceModel ?? $this->getAttribute()->getOptionSourceVirtualType(); 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getAttributeColumnSettingsStringXml(): string 42 | { 43 | $attributes = $this->getSchemaAttributes(); 44 | if (strlen($attributes) > 0) { 45 | $attributes .= ' '; 46 | } 47 | $attributes .= 'nullable="' . ($this->getAttribute()->isRequired() ? 'false' : 'true') . '"'; 48 | return $attributes; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Type/Dropdown.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\MagentoBundle\Model\Attribute\Type; 23 | 24 | class Dropdown extends BaseType 25 | { 26 | /** 27 | * @return string 28 | */ 29 | public function getSchemaType(): string 30 | { 31 | return !$this->getAttribute()->areOptionsNumerical() ? 'varchar' : parent::getSchemaType(); 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getSchemaAttributes(): string 38 | { 39 | return !$this->getAttribute()->areOptionsNumerical() ? ' length="255"' : parent::getSchemaAttributes(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Type/Dynamic.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Type; 22 | 23 | use App\Umc\MagentoBundle\Model\Attribute; 24 | 25 | class Dynamic extends BaseType 26 | { 27 | /** 28 | * @return array 29 | */ 30 | public function getFlags() 31 | { 32 | $flags = parent::getFlags(); 33 | /** @var Attribute $attribute */ 34 | $attribute = $this->getAttribute(); 35 | foreach ($attribute->getDynamic() as $field) { 36 | $flags = array_merge($flags, $field->getTypeInstance()->getFlags()); 37 | } 38 | return array_unique($flags); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Type/ProductAttribute.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Type; 22 | 23 | class ProductAttribute extends BaseType 24 | { 25 | /** 26 | * @return string 27 | */ 28 | public function getSourceModel(): string 29 | { 30 | $module = $this->getAttribute()->getEntity()->getModule(); 31 | $parts = [ 32 | $module->getUmcCrudNamespace(), 33 | $module->getUmcModuleName(), 34 | 'Source', 35 | 'Catalog', 36 | 'ProductAttribute' 37 | ]; 38 | return implode('\\', $parts); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Model/Attribute/Type/ProductAttributeSet.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\MagentoBundle\Model\Attribute\Type; 22 | 23 | class ProductAttributeSet extends BaseType 24 | { 25 | /** 26 | * @return string 27 | */ 28 | public function getSourceModel(): string 29 | { 30 | $module = $this->getAttribute()->getEntity()->getModule(); 31 | $parts = [ 32 | $module->getUmcCrudNamespace(), 33 | $module->getUmcModuleName(), 34 | 'Source', 35 | 'Catalog', 36 | 'ProductAttributeSet' 37 | ]; 38 | return implode('\\', $parts); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/config/form/attribute.yml: -------------------------------------------------------------------------------- 1 | attribute: 2 | fields: 3 | - 4 | name: type 5 | options: '%magento_attribute_type%' 6 | - 7 | name: full_text 8 | type: checkbox 9 | has_default: true 10 | label: Full text 11 | title: This adds the attribute to the full text search index of the entity 12 | additionalDataBind: "enable: data.type() === 'text' || data.type() === 'textarea' || data.type() === 'wysiwyg' || data.type() === 'country' || data.type() === 'country_multiselect'" 13 | tab: admin 14 | sort_order: 55 15 | - 16 | name: expanded 17 | type: checkbox 18 | has_default: true 19 | label: Display Expanded 20 | title: If set yo "Yes" each field in the dynamic rows group will be displayed on a separate line. If set to "No" they will all be on the same line 21 | additionalDataBind: "enable: data.type() === 'dynamic'" 22 | tab: admin 23 | sort_order: 100 24 | 25 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/config/form/entity.yml: -------------------------------------------------------------------------------- 1 | entity: 2 | tabs: 3 | - 4 | label: Admin 5 | code: admin 6 | sort_order: 15 7 | fields: 8 | - 9 | name: store 10 | type: checkbox 11 | has_default: true 12 | label: Associate to store views 13 | title: Selecting "Yes" it will add a multiselect field in the add / edit form for the entity that will allow you to select the associated stores. Similar to CMS blocks and pages 14 | tab: admin 15 | sort_order: 10 16 | - 17 | name: top_menu 18 | type: checkbox 19 | has_default: true 20 | label: Top menu Item 21 | title: If the entity has frontend, a link to its list will be placed in the top menu 22 | additionalDataBind: 'enable: data.frontend' 23 | tab: frontend 24 | sort_order: 50 25 | - 26 | name: footer_links 27 | type: checkbox 28 | has_default: true 29 | label: Footer Links 30 | title: If the entity has frontend, a link to its list will be placed in footer links to the list page 31 | additionalDataBind: 'enable: data.frontend' 32 | tab: frontend 33 | sort_order: 60 34 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/config/form/module.yml: -------------------------------------------------------------------------------- 1 | module: 2 | fields: 3 | - 4 | name: umc_crud 5 | type: checkbox 6 | label: I have Umc_Crud module installed 7 | required: false 8 | title: Umc_Crud is a Magento module that reduces the boilerplate when creating a CRUD module. More details here. 9 | has_default: true 10 | sort_order: 1000 11 | tab: base 12 | - 13 | name: menu_parent 14 | options: '%magento_admin_menu%' 15 | additionalDataBind: "select2: {}" 16 | - 17 | name: config_tab 18 | type: text 19 | label: Store -> Config tab name. 20 | required: false 21 | title: If at least one entity has frontend files then a section in Stores->Configuration will be created. Fill in the tab name here. Leave empty to use the namespace. 22 | tab: admin 23 | sort_order: 120 24 | - 25 | name: config_tab_position 26 | type: text 27 | label: Stores -> Configuration tab position 28 | required: false 29 | dataValidation: validate_number 30 | title: If at least one entity has frontend files then a section in System->Configuration will be created. Fill in the tab position. The higher the number the lower it will appear in the list. 31 | tab: admin 32 | sort_order: 130 33 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/public/logo/magento.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/MagentoBundle/Resources/public/logo/magento.png -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/date.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ attribute.getEntity().getNameSingular()|snake }} 5 | {% if attribute.getDefaultValue() %} 6 | {{ attribute.getDefaultValue() }} 7 | {% endif %} 8 | 9 | 10 | 11 | text 12 | 13 | {{ attribute.getCode() }} 14 | {% if attribute.isRequired() %} 15 | 16 | true 17 | 18 | {% endif %} 19 | {% if attribute.getNote() %} 20 | {{ attribute.getNote() }} 21 | {% endif %} 22 | {% if attribute.getTooltip() %} 23 | 24 | {{ attribute.getTooltip() }} 25 | 26 | {% endif %} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/dynamic/textarea.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }} 2 | {{ indent }} 3 | {{ indent }} 4 | {{ indent }}{{ attribute.getCode() }} 5 | {% if field.getDefaultValue() %} 6 | {{ indent }}{{ field.getDefaultValue() }} 7 | {% endif %} 8 | {{ indent }} 9 | {{ indent }} 10 | {{ indent }} 11 | {{ indent }}text 12 | {{ indent }} 13 | {{ indent }}{{ field.getCode() }} 14 | {% if field.isRequired() %} 15 | {{ indent }} 16 | {{ indent }}true 17 | {{ indent }} 18 | {% endif %} 19 | {% if field.getNote() %} 20 | {{ indent }}{{ attribute.getNote() }} 21 | {% endif %} 22 | {% if field.getTooltip() %} 23 | {{ indent }} 24 | {{ indent }}{{ field.getTooltip() }} 25 | {{ indent }} 26 | {% endif %} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/file.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ attribute.getEntity().getNameSingular()|snake }} 5 | 6 | 7 | 8 | text 9 | 10 | {{ attribute.getCode() }} 11 | ui/form/element/uploader/uploader 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{ module.getUmcCrudNamespace()|camel|ucfirst }}_{{ module.getUmcModuleName()|camel|ucfirst }}/preview 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/text.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ attribute.getEntity().getNameSingular()|snake }} 5 | {% if attribute.getDefaultValue() %} 6 | {{ attribute.getDefaultValue() }} 7 | {% endif %} 8 | 9 | 10 | 11 | {% if attribute.isRequired() %} 12 | 13 | true 14 | 15 | {% endif %} 16 | text 17 | 18 | {{ attribute.getCode() }} 19 | {% if attribute.getNote() %} 20 | {{ attribute.getNote() }} 21 | {% endif %} 22 | {% if attribute.getTooltip() %} 23 | 24 | {{ attribute.getTooltip() }} 25 | 26 | {% endif %} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/textarea.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ attribute.getEntity().getNameSingular()|snake }} 5 | {% if attribute.getDefaultValue() %} 6 | {{ attribute.getDefaultValue() }} 7 | {% endif %} 8 | 9 | 10 | 11 | text 12 | 13 | {{ attribute.getCode() }} 14 | {% if attribute.isRequired() %} 15 | 16 | true 17 | 18 | {% endif %} 19 | {% if attribute.getNote() %} 20 | {{ attribute.getNote() }} 21 | {% endif %} 22 | {% if attribute.getTooltip() %} 23 | 24 | {{ attribute.getTooltip() }} 25 | 26 | {% endif %} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/form/wysiwyg.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | wysiwyg 5 | {{ attribute.getEntity().getNameSingular()|snake }} 6 | ui/form/field 7 | true 8 | 8 9 | 10 | 11 | 12 | text 13 | 14 | {{ attribute.getCode() }} 15 | {% if attribute.isRequired() %} 16 | 17 | true 18 | 19 | {% endif %} 20 | {% if attribute.getNote() %} 21 | {{ attribute.getNote() }} 22 | {% endif %} 23 | {% if attribute.getTooltip() %} 24 | 25 | {{ attribute.getTooltip() }} 26 | 27 | {% endif %} 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/country.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'options', 6 | {{ indent }} 'source' => \Magento\Directory\Model\Config\Source\Country::class 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/date.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}')); ?> 2 | {{ indent }}formatHtml(${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), ['type' => 'date']); ?> 3 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/country.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} [ 4 | {{ indent }} 'type' => 'options', 5 | {{ indent }} 'source' => \Magento\Directory\Model\Config\Source\Country::class 6 | {{ indent }} ] 7 | {{ indent }});?> 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/date.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} ['type' => 'date'] 4 | {{ indent }});?> 5 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/option.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} [ 4 | {{ indent }} 'type' => 'options', 5 | {{ indent }} 'source' => '{{ field.getOptionSourceVirtualType() }}' 6 | {{ indent }} ] 7 | {{ indent }}); ?> 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/product_attribute.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} [ 4 | {{ indent }} 'type' => 'options', 5 | {{ indent }} 'source' => \{{ module.getUmcCrudNamespace()|camel|ucfirst }}\{{ module.getUmcModuleName()|camel|ucfirst }}\Source\Catalog\ProductAttribute::class 6 | {{ indent }} ] 7 | {{ indent }});?> 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/product_attribute_set.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} [ 4 | {{ indent }} 'type' => 'options', 5 | {{ indent }} 'source' => \{{ module.getUmcCrudNamespace()|camel|ucfirst }}\{{ module.getUmcModuleName()|camel|ucfirst }}\Source\Catalog\ProductAttributeSet::class 6 | {{ indent }} ] 7 | {{ indent }});?> 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/text.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} ['type' => 'text'] 4 | {{ indent }});?> 5 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/dynamic/yesno.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}formatHtml( 2 | {{ indent }} $item['{{ field.getCode() }}'], 3 | {{ indent }} [ 4 | {{ indent }} 'type' => 'options', 5 | {{ indent }} 'source' => \Magento\Config\Model\Config\Source\Yesno::class 6 | {{ indent }} ] 7 | {{ indent }});?> 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/editor.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}')); ?> 2 | {{ indent }}formatHtml(${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), ['type' => 'editor']); ?> 3 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/file.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'file', 6 | {{ indent }} 'path' => '{{ entity.getUploadFolder('file') }}' 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | {{ indent }} 10 | {{ indent }} 11 | {{ indent }} escapeHtml(basename(${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}())); ?> 12 | {{ indent }} 13 | {{ indent }} 14 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/image.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'image', 6 | {{ indent }} 'resize' => [200], 7 | {{ indent }} 'path' => '{{ entity.getUploadFolder('image') }}' 8 | {{ indent }} ] 9 | {{ indent }}); ?> 10 | {{ indent }} 11 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/option.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'options', 6 | {{ indent }} 'source' => '{{ attribute.getOptionSourceVirtualType() }}' 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/product_attribute.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'options', 6 | {{ indent }} 'source' => \{{ module.getUmcCrudNamespace()|camel|ucfirst }}\{{ module.getUmcModuleName()|camel|ucfirst }}\Source\Catalog\ProductAttribute::class 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/product_attribute_set.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'options', 6 | {{ indent }} 'source' => \{{ module.getUmcCrudNamespace()|camel|ucfirst }}\{{ module.getUmcModuleName()|camel|ucfirst }}\Source\Catalog\ProductAttributeSet::class 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/text.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}')); ?> 2 | {{ indent }}formatHtml(${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), ['type' => 'text']); ?> 3 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/frontend/yesno.html.twig: -------------------------------------------------------------------------------- 1 | {{ indent }}escapeHtml(__('{{ attribute.getLabel() }}:')); ?> 2 | {{ indent }}formatHtml( 3 | {{ indent }} ${{entity.getNameSingular()|camel}}->get{{ attribute.getCode()|camel|ucfirst }}(), 4 | {{ indent }} [ 5 | {{ indent }} 'type' => 'options', 6 | {{ indent }} 'source' => \Magento\Config\Model\Config\Source\Yesno::class 7 | {{ indent }} ] 8 | {{ indent }}); ?> 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/grid/date.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | dateRange 4 | 5 | {% if (attribute.isRequired()) %} 6 | 7 | true 8 | 9 | {% endif %} 10 | date 11 | 12 | date 13 | false 14 | MMM d, y 15 | 16 | {% if attribute.isAdminGridHidden() %} 17 | false 18 | {% endif %} 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/grid/image.html.twig: -------------------------------------------------------------------------------- 1 | 2 | {{ entity.getVirtualType('UiConfig') }} 3 | {{ entity.getVirtualType('ImageInfo') }} 4 | 5 | 6 | Magento_Ui/js/grid/columns/thumbnail 7 | false 8 | 1 9 | {{ attribute.getLabel() }} 10 | {% if attribute.isAdminGridHidden() %} 11 | false 12 | {% endif %} 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/grid/select.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ type.getGridFilterType() }} 4 | {% if not type.hasFlag('multiple') %} 5 | 6 | {% if (attribute.isRequired()) %} 7 | 8 | true 9 | 10 | {% endif %} 11 | select 12 | 13 | {% endif %} 14 | select 15 | 16 | 17 | {% if attribute.isAdminGridHidden() %} 18 | false 19 | {% endif %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/grid/text.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% if (attribute.isAdminGridFilter()) %} 4 | {{ type.getGridFilterType() }} 5 | {% endif %} 6 | 7 | {% if (attribute.isRequired()) %} 8 | 9 | true 10 | 11 | {% endif %} 12 | text 13 | 14 | 15 | {% if attribute.isAdminGridHidden() %} 16 | false 17 | {% endif %} 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/interface/array.html.twig: -------------------------------------------------------------------------------- 1 | /** 2 | * Set {{ attribute.getLabel() }} 3 | * 4 | * @param {{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel}} 5 | * @return {{ entity.getNameSingular()|camel|ucfirst }}Interface 6 | */ 7 | public function set{{ attribute.getCode()|camel|ucfirst }}(${{ attribute.getCode()|camel}}); 8 | 9 | /** 10 | * Get {{ attribute.getLabel() }} 11 | * 12 | * @param bool $asArray 13 | * @return {{ attribute.getTypeInstance().getTypeHint() }} 14 | */ 15 | public function get{{ attribute.getCode()|camel|ucfirst }}($asArray = false); 16 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/interface/default.html.twig: -------------------------------------------------------------------------------- 1 | /** 2 | * Set {{ attribute.getLabel() }} 3 | * 4 | * @param {{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel}} 5 | * @return {{ entity.getNameSingular()|camel|ucfirst }}Interface 6 | */ 7 | public function set{{ attribute.getCode()|camel|ucfirst }}(${{ attribute.getCode()|camel}}); 8 | 9 | /** 10 | * Get {{ attribute.getLabel() }} 11 | * 12 | * @return {{ attribute.getTypeInstance().getTypeHint() }} 13 | */ 14 | public function get{{ attribute.getCode()|camel|ucfirst }}(); 15 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/model/default.html.twig: -------------------------------------------------------------------------------- 1 | /** 2 | * Set {{ attribute.getLabel() }} 3 | * 4 | * @param {{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel}} 5 | * @return {{ entity.getNameSingular()|camel|ucfirst }}Interface 6 | */ 7 | public function set{{ attribute.getCode()|camel|ucfirst }}(${{ attribute.getCode()|camel}}) 8 | { 9 | return $this->setData(self::{{ attribute.getCode()|upper}}, ${{ attribute.getCode()|camel}}); 10 | } 11 | 12 | /** 13 | * Get {{ attribute.getLabel() }} 14 | * 15 | * @return {{ attribute.getTypeInstance().getTypeHint() }} 16 | */ 17 | public function get{{ attribute.getCode()|camel|ucfirst }}() 18 | { 19 | return $this->getData(self::{{ attribute.getCode()|upper}}); 20 | } 21 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/model/multiselect.html.twig: -------------------------------------------------------------------------------- 1 | /** 2 | * Set {{ attribute.getLabel() }} 3 | * 4 | * @param {{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel}} 5 | * @return {{ entity.getNameSingular()|camel|ucfirst }}Interface 6 | */ 7 | public function set{{ attribute.getCode()|camel|ucfirst }}(${{ attribute.getCode()|camel}}) 8 | { 9 | if (is_array(${{ attribute.getCode()|camel}})) { 10 | ${{ attribute.getCode()|camel}} = implode(',', ${{ attribute.getCode()|camel}}); 11 | } 12 | return $this->setData({{ entity.getNameSingular()|camel|ucfirst }}Interface::{{ attribute.getCode()|upper}}, ${{ attribute.getCode()|camel}}); 13 | } 14 | 15 | /** 16 | * Get {{ attribute.getLabel() }} 17 | * 18 | * @param bool $asArray 19 | * @return {{ attribute.getTypeInstance().getTypeHint() }} 20 | */ 21 | public function get{{ attribute.getCode()|camel|ucfirst }}($asArray = false) 22 | { 23 | ${{ attribute.getCode()|camel}} = $this->getData(self::{{ attribute.getCode()|upper}}); 24 | return ($asArray) 25 | ? (${{ attribute.getCode()|camel}} ? explode(',', ${{ attribute.getCode()|camel}}) : []) 26 | : ${{ attribute.getCode()|camel}}; 27 | } 28 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/schema_fk/product_attribute_set.html.twig: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/country.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/default.html.twig' with {setterValue: "'RO'"} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/country_multiple.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/multiple.html.twig' with {setterValue: "['RO', 'MD']", getterValue: "'RO,MD'"} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/date.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/default.html.twig' with {setterValue: "'1983-08-18'"} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/decimal.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/default.html.twig' with {setterValue: 2.71828} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/default.html.twig: -------------------------------------------------------------------------------- 1 | {% if setterValue is not defined %}{% set setterValue = "'" ~ attribute.getCode() ~ "'"%}{% endif %} /** 2 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::set{{ attribute.getCode()|camel|ucfirst }} 3 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::get{{ attribute.getCode()|camel|ucfirst }} 4 | {% if entity.hasAttributesWithType('dynamic') %} 5 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::__construct 6 | {% endif %} 7 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::_construct 8 | */ 9 | public function testSet{{ attribute.getCode()|camel|ucfirst }}() 10 | { 11 | $this->{{ entity.getNameSingular()|camel }}->set{{ attribute.getCode()|camel|ucfirst }}({{ setterValue|raw }}); 12 | $this->assertEquals({{ setterValue|raw }}, $this->{{ entity.getNameSingular()|camel }}->get{{ attribute.getCode()|camel|ucfirst }}()); 13 | } 14 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/integer.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/default.html.twig' with {setterValue: 10} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/multiple.html.twig: -------------------------------------------------------------------------------- 1 | {% if setterValue is not defined %}{% set setterValue = "['" ~ attribute.getCode() ~ "1', '"~ attribute.getCode() ~"2']"%}{% endif %}{% if getterValue is not defined %}{% set getterValue = "'" ~ attribute.getCode() ~ "1,"~ attribute.getCode() ~"2'"%}{% endif %} /** 2 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::set{{ attribute.getCode()|camel|ucfirst }} 3 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::get{{ attribute.getCode()|camel|ucfirst }} 4 | {% if entity.hasAttributesWithType('dynamic') %} 5 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::__construct 6 | {% endif %} 7 | * @covers \{{ module.getNamespace() }}\{{ module.getModuleName() }}\Model\{{ entity.getNameSingular()|camel|ucfirst }}::_construct 8 | */ 9 | public function testSet{{ attribute.getCode()|camel|ucfirst }}() 10 | { 11 | $this->{{ entity.getNameSingular()|camel }}->set{{ attribute.getCode()|camel|ucfirst }}({{ setterValue|raw }}); 12 | $this->assertEquals({{ getterValue|raw }}, $this->{{ entity.getNameSingular()|camel }}->get{{ attribute.getCode()|camel|ucfirst }}()); 13 | $this->assertEquals({{ setterValue|raw }}, $this->{{ entity.getNameSingular()|camel }}->get{{ attribute.getCode()|camel|ucfirst }}(true)); 14 | } 15 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/attribute/unit_test/yesno.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@UmcMagento/attribute/unit_test/default.html.twig' with {setterValue: 1} %} 2 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/actions.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ entity.getVirtualType('UiConfig') }} 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/buttons.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ entity.getVirtualType('UiConfig') }} 5 | 6 | 7 | 8 | 9 | {{ entity.getVirtualType('UiConfig') }} 10 | 11 | 12 | 13 | 14 | {{ entity.getVirtualType('UiConfig') }} 15 | {{ entity.getModel('UiManager') }} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/provider/dynamic_rows.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for attribute in attributes %} 5 | {{ attribute.getCode() }} 6 | {% endfor %} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/provider/file.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getVirtualType('FileUploader') }} 4 | {{ entity.getVirtualType('FileInfo') }} 5 | 6 | {% for attribute in attributes %} 7 | {{ attribute.getCode() }} 8 | {% endfor %} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/provider/image.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getVirtualType('ImageUploader') }} 4 | {{ entity.getVirtualType('ImageInfo') }} 5 | 6 | {% for attribute in attributes %} 7 | {{ attribute.getCode() }} 8 | {% endfor %} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/provider/multiselect.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for attribute in attributes %} 5 | {{ attribute.getCode() }} 6 | {% endfor %} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/save/date.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for attribute in attributes %} 5 | {{ attribute.getCode() }} 6 | {% endfor %} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/save/dynamic_rows.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for attribute in attributes %} 5 | {{ attribute.getCode() }} 6 | {% endfor %} 7 | 8 | true 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/save/file.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getVirtualType('FileInfo') }} 4 | {{ entity.getVirtualType('FileUploader') }} 5 | 6 | {% for attribute in attributes %} 7 | {{ attribute.getCode() }} 8 | {% endfor %} 9 | 10 | true 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/save/image.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getVirtualType('ImageInfo') }} 4 | {{ entity.getVirtualType('ImageUploader') }} 5 | 6 | {% for attribute in attributes %} 7 | {{ attribute.getCode() }} 8 | {% endfor %} 9 | 10 | true 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/adminhtml/di/processor/save/multiselect.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for attribute in attributes %} 5 | {{ attribute.getCode() }} 6 | {% endfor %} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/di/preference.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/di/store-handlers.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getStoreHandler('Read') }} 4 | 5 | 6 | {{ entity.getStoreHandler('Save') }} 7 | 8 | 9 | {{ entity.getStoreHandler('Save') }} 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/entity/di/store-link.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ entity.getResourceModel() }} 4 | 5 | 6 | 7 | 8 | {{ entity.getResourceModel() }} 9 | {{ entity.getInterface() }} 10 | {{ entity.getStoreTableName() }} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Api/Data/_Entity_SearchResultsInterface.php.html.twig: -------------------------------------------------------------------------------- 1 | __('Reset'), 20 | 'class' => 'reset', 21 | 'on_click' => 'location.reload();', 22 | 'sort_order' => 30 23 | ]; 24 | } 25 | } 26 | {% endif %} 27 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Controller/Adminhtml/NewAction.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | resultFactory->create(ResultFactory::TYPE_FORWARD); 22 | $forward->forward('edit'); 23 | return $forward; 24 | } 25 | } 26 | {% endif %} 27 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Controller/Adminhtml/_Entity_/Delete.php.html.twig: -------------------------------------------------------------------------------- 1 | _init('{{ entity.getMainTableName() }}', '{{ entity.getPk()}}'); 20 | } 21 | {% if entity.isStore() %} 22 | 23 | /** 24 | * @param string $field 25 | * @param mixed $value 26 | * @param \Magento\Framework\Model\AbstractModel $object 27 | * @return \Magento\Framework\DB\Select 28 | * @throws \Magento\Framework\Exception\LocalizedException 29 | * @codeCoverageIgnore 30 | */ 31 | protected function _getLoadSelect($field, $value, $object) 32 | { 33 | $select = parent::_getLoadSelect($field, $value, $object); 34 | $select->where('is_active = ?', 1); 35 | return $select; 36 | } 37 | {% endif %} 38 | //phpcs: enable 39 | } 40 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Model/ResourceModel/_Entity_/Collection.php.html.twig: -------------------------------------------------------------------------------- 1 | _init( 30 | \{{ entity.getModel() }}::class, 31 | \{{ entity.getResourceModel() }}::class 32 | ); 33 | {% if entity.isStore() %} 34 | $this->_map['fields']['store_id'] = 'store_table.store_id'; 35 | $this->_map['fields']['{{ entity.getPk() }}'] = 'main_table.{{ entity.getPk() }}'; 36 | {% endif %} 37 | //phpcs: enable 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Model/_Entity_SearchResults.php.html.twig: -------------------------------------------------------------------------------- 1 | factory = $factory; 25 | } 26 | 27 | /** 28 | * @return \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection 29 | */ 30 | public function getCollection() 31 | { 32 | return $this->factory->create(); 33 | } 34 | } 35 | {% endif %} 36 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/README.md.html.twig: -------------------------------------------------------------------------------- 1 | # {{ module.getExtensionName() }} Magento 2 module 2 | 3 | Generated using [Ultimate Module Creator](https://github.com/UltimateModuleCreator/umc) 4 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Source/StoreView.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.hasEntitiesWithFlag('store') %} 2 | options !== null) { 27 | return $this->options; 28 | } 29 | 30 | $this->currentOptions['All Store Views']['label'] = __('All Store Views'); 31 | $this->currentOptions['All Store Views']['value'] = self::ALL_STORE_VIEWS; 32 | 33 | $this->generateCurrentOptions(); 34 | 35 | $this->options = array_values($this->currentOptions); 36 | 37 | return $this->options; 38 | } 39 | } 40 | {% endif %} 41 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Block/Adminhtml/Button/ResetTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | getButtonData(); 21 | $this->assertEquals(__('Reset'), $result['label']); 22 | $this->assertEquals("location.reload();", $result['on_click']); 23 | } 24 | } 25 | {% endif %} 26 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Controller/Adminhtml/NewActionTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | createMock(Context::class); 23 | $resultFactory = $this->createMock(ResultFactory::class); 24 | $forward = $this->createMock(Forward::class); 25 | $context->expects($this->once())->method('getResultFactory')->willReturn($resultFactory); 26 | $resultFactory->expects($this->once())->method('create')->willReturn($forward); 27 | $newAction = new NewAction($context); 28 | $forward->expects($this->once())->method('forward')->with('edit'); 29 | $this->assertEquals($forward, $newAction->execute()); 30 | } 31 | } 32 | {% endif %} 33 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Model/_Entity_UiCollectionProviderTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | createMock(CollectionFactory::class); 22 | $collection = $this->createMock(Collection::class); 23 | $factory->expects($this->once())->method('create')->willReturn($collection); 24 | $provider = new {{ entity.getNameSingular()|camel }}UiCollectionProvider($factory); 25 | $this->assertEquals($collection, $provider->getCollection()); 26 | } 27 | } 28 | {% endif %} 29 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Ui/Form/DataModifier/MultiselectTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.hasEntitiesWithFlag('attribute_processor_provider_multiselect') %} 2 | createMock(AbstractModel::class); 21 | $modifier = new Multiselect(['field1', 'field2', 'field3', 'field4']); 22 | $data = [ 23 | 'field1' => '1,2,3', 24 | 'field2' => [3, 4, 5], 25 | 'field3' => null, 26 | 'dummy' => 'dummy' 27 | ]; 28 | $expected = [ 29 | 'field1' => [1, 2, 3], 30 | 'field2' => [3, 4, 5], 31 | 'field3' => [], 32 | 'dummy' => 'dummy' 33 | ]; 34 | $this->assertEquals($expected, $modifier->modifyData($model, $data)); 35 | } 36 | } 37 | {% endif %} 38 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Ui/Form/DataModifier/NullModifierTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | createMock(AbstractModel::class); 21 | $data = ['dummy']; 22 | $this->assertEquals($data, (new NullModifier())->modifyData($model, $data)); 23 | } 24 | } 25 | {% endif %} 26 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Ui/SaveDataProcessor/MultiselectTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.hasEntitiesWithFlag('attribute_processor_save_multiselect') %} 2 | [1, 2, 3], 22 | 'field2' => '4,5,6', 23 | 'dummy' => 'dummy' 24 | ]; 25 | $expected = [ 26 | 'field1' => '1,2,3', 27 | 'field2' => '4,5,6', 28 | 'dummy' => 'dummy' 29 | ]; 30 | $this->assertEquals($expected, $modifier->modifyData($data)); 31 | } 32 | } 33 | {% endif %} 34 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Test/Unit/Ui/SaveDataProcessor/NullProcessorTest.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | assertEquals($data, (new NullProcessor())->modifyData($data)); 21 | } 22 | } 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Ui/CollectionProviderInterface.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | modifiers = $modifiers; 30 | } 31 | 32 | /** 33 | * @param array $data 34 | * @return array 35 | */ 36 | public function modifyData(array $data): array 37 | { 38 | foreach ($this->modifiers as $modifier) { 39 | $data = $modifier->modifyData($data); 40 | } 41 | return $data; 42 | } 43 | } 44 | {% endif %} 45 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Ui/SaveDataProcessor/Multiselect.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.hasEntitiesWithFlag('attribute_processor_save_multiselect') %} 2 | fields = $fields; 23 | } 24 | 25 | /** 26 | * @param array $data 27 | * @return array 28 | */ 29 | public function modifyData(array $data): array 30 | { 31 | foreach ($this->fields as $field) { 32 | if (!array_key_exists($field, $data)) { 33 | continue; 34 | } 35 | $value = $data[$field] ?? []; 36 | if (is_array($value)) { 37 | $data[$field] = implode(',', $value); 38 | } 39 | } 40 | return $data; 41 | } 42 | } 43 | {% endif %} 44 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/Ui/SaveDataProcessor/NullProcessor.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() %} 2 | escaper = $escaper; 23 | } 24 | 25 | /** 26 | * @param $value 27 | * @param array $arguments 28 | * @return string 29 | */ 30 | public function formatHtml($value, $arguments = []): string 31 | { 32 | return $this->escaper->escapeHtml($value); 33 | } 34 | } 35 | {% endif %} 36 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/ViewModel/Formatter/Wysiwyg.php.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.isFrontend() and module.hasEntitiesWithFlag('attribute_processor_frontend_editor') %} 2 | filter = $filter; 21 | } 22 | 23 | /** 24 | * @param $value 25 | * @param array $arguments 26 | * @return string 27 | * @throws \Zend_Filter_Exception 28 | */ 29 | public function formatHtml($value, $arguments = []): string 30 | { 31 | return $this->filter->filter($value); 32 | } 33 | } 34 | {% endif %} 35 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/composer.json.html.twig: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{module.getComposerExtensionName() }}", 3 | "description": "{{module.getExtensionName() }} magento 2 extension", 4 | "require": { 5 | {% for dep in module.getComposerDependencies() %} 6 | "{{ dep }}": "*", 7 | {% endfor %} 8 | "php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0" 9 | }, 10 | "type": "magento2-module", 11 | "license": [ 12 | "OSL-3.0", 13 | "AFL-3.0" 14 | ], 15 | "autoload": { 16 | "files": [ 17 | "registration.php" 18 | ], 19 | "psr-4": { 20 | "{{ module.getExtensionName('\\\\') }}\\": "" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/etc/adminhtml/menu.xml.html.twig: -------------------------------------------------------------------------------- 1 | {{ formatLicense(module, 'xml')|raw }} 2 | 3 | 4 | 10 | {% for entity in module.getEntities() %} 11 | 19 | {% endfor %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/etc/adminhtml/routes.xml.html.twig: -------------------------------------------------------------------------------- 1 | {{ formatLicense(module, 'xml')|raw }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/etc/config.xml.html.twig: -------------------------------------------------------------------------------- 1 | {% if module.isFrontend() %} 2 | {{ formatLicense(module, 'xml')|raw }} 3 | 4 | 5 | <{{ module.getModuleName()|snake }}> 6 | {% for entity in module.getEntities() %} 7 | {% if entity.isFrontend()%} 8 | <{{ entity.getNameSingular()|snake }}> 9 | 1 10 | {{ entity.getLabelPlural() }} 11 | 12 | {% endif %} 13 | {% endfor %} 14 | 15 | 16 | 17 | {% endif %} 18 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/etc/frontend/routes.xml.html.twig: -------------------------------------------------------------------------------- 1 | {% if module.isFrontend() %} 2 | {{ formatLicense(module, 'xml')|raw }} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/etc/module.xml.html.twig: -------------------------------------------------------------------------------- 1 | {{ formatLicense(module, 'xml')|raw }} 2 | 3 | 4 | 5 | {% for dep in module.getModuleDependencies() %} 6 | 7 | {% endfor %} 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/registration.php.html.twig: -------------------------------------------------------------------------------- 1 | {{ formatLicense(module, 'xml')|raw }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/view/adminhtml/layout/_modulename___entity__index.xml.html.twig: -------------------------------------------------------------------------------- 1 | {{ formatLicense(module, 'xml')|raw }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/view/adminhtml/web/template/preview.html.html.twig: -------------------------------------------------------------------------------- 1 | {% if not module.isUmcCrud() and module.hasEntitiesWithFlag('attribute_upload') %} 2 |
3 |
4 | 7 | 14 | 15 | 16 |
17 | 25 |
26 |
27 | 28 |
29 | 30 |
31 | 32 | x, 33 | 34 | 35 |
36 |
37 | {% endif %} 38 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/Resources/views/source/view/frontend/layout/default.xml.html.twig: -------------------------------------------------------------------------------- 1 | {% if module.hasEntitiesWithFlag('footer_links') %} 2 | {{ formatLicense(module, 'xml')|raw }} 3 | 4 | 5 | 6 | {% for entity in module.getEntitiesWithFlag('footer_links') %} 7 | 8 | 9 | {{ entity.getLabelPlural() }} 10 | {{ module.getModuleName()|camel|lower }}/{{ entity.getNameSingular()|camel|lower }}/index 11 | 12 | 13 | {% endfor %} 14 | 15 | 16 | 17 | {% endif %} 18 | -------------------------------------------------------------------------------- /src/Umc/MagentoBundle/UmcMagentoBundle.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\MagentoBundle; 23 | 24 | use Symfony\Component\DependencyInjection\ContainerBuilder; 25 | use Symfony\Component\HttpKernel\Bundle\Bundle; 26 | 27 | class UmcMagentoBundle extends Bundle 28 | { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/Umc/ShopwareBundle/DependencyInjection/UmcShopwareExtension.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\ShopwareBundle\DependencyInjection; 22 | 23 | use Symfony\Component\Config\FileLocator; 24 | use Symfony\Component\DependencyInjection\ContainerBuilder; 25 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; 26 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; 27 | 28 | class UmcShopwareExtension extends Extension 29 | { 30 | /** 31 | * @param array $configs 32 | * @param ContainerBuilder $container 33 | * @throws \Exception 34 | */ 35 | public function load(array $configs, ContainerBuilder $container) 36 | { 37 | $loader = new XmlFileLoader( 38 | $container, 39 | new FileLocator((__DIR__ . '/../Resources/config')) 40 | ); 41 | $loader->load('services.xml'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Umc/ShopwareBundle/Resources/config/platform.yml: -------------------------------------------------------------------------------- 1 | shopware: 2 | code: shopware 3 | name: Shopware 6 4 | url: 'https://shopware.com/' 5 | image: 'bundles/umcshopware/logo/shopware.png' 6 | sort_order: 20 7 | unsupported_message: Shopware 6 might be supported later. 8 | config: 9 | form: 10 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/module.yml' 11 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/entity.yml' 12 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/attribute.yml' 13 | -------------------------------------------------------------------------------- /src/Umc/ShopwareBundle/Resources/config/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | %kernel.project_dir%/src/Umc/ShopwareBundle/Resources/config/platform.yml 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Umc/ShopwareBundle/Resources/public/logo/shopware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/ShopwareBundle/Resources/public/logo/shopware.png -------------------------------------------------------------------------------- /src/Umc/ShopwareBundle/UmcShopwareBundle.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\ShopwareBundle; 23 | 24 | use Symfony\Component\HttpKernel\Bundle\Bundle; 25 | 26 | class UmcShopwareBundle extends Bundle 27 | { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Model/Entity.php: -------------------------------------------------------------------------------- 1 | 16 | * 17 | */ 18 | 19 | declare(strict_types=1); 20 | 21 | namespace App\Umc\SyliusBundle\Model; 22 | 23 | class Entity extends \App\Umc\CoreBundle\Model\Entity 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/form/attribute.yml: -------------------------------------------------------------------------------- 1 | attribute: 2 | tabs: 3 | - 4 | code: frontend 5 | enabled: false 6 | - 7 | code: name 8 | label: Attribute Settings 9 | fields: 10 | - 11 | name: type 12 | options: '%sylius_attribute_type%' 13 | - 14 | name: admin_grid_hidden 15 | enabled: false 16 | - 17 | name: show_in_list 18 | enabled: false 19 | - 20 | name: show_in_view 21 | enabled: false 22 | - 23 | name: default_value 24 | enabled: false 25 | - 26 | name: note 27 | enabled: false 28 | - 29 | name: tooltip 30 | enabled: false 31 | - 32 | name: required 33 | tab: name 34 | - 35 | name: admin_grid 36 | tab: name 37 | - 38 | name: admin_grid_filter 39 | tab: name 40 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/form/entity.yml: -------------------------------------------------------------------------------- 1 | entity: 2 | children: 3 | - 4 | code: _attributes 5 | addButton: 6 | split: 7 | values: '%sylius_attribute_type%' 8 | tabs: 9 | - 10 | code: frontend 11 | enabled: false 12 | - 13 | code: name 14 | label: Entity Settings 15 | fields: 16 | - 17 | name: search 18 | enabled: false 19 | - 20 | name: frontend 21 | enabled: false 22 | - 23 | name: seo 24 | enabled: false 25 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/form/module.yml: -------------------------------------------------------------------------------- 1 | module: 2 | code: module 3 | settings_label: "Bundle Default Settings" 4 | panel: 5 | default: New Bundle 6 | children: 7 | - 8 | code: _relations 9 | enabled: false 10 | 11 | fields: 12 | - 13 | name: module_name 14 | label: Bundle Name 15 | title: "Module name must be alphanumerical and start with a capital letter" 16 | - 17 | name: menu_parent 18 | options: '%sylius_admin_menu%' 19 | additionalDataBind: "select2: {}" 20 | sort_order: 35 21 | tab: base 22 | - 23 | name: front_key 24 | enabled: false 25 | - 26 | name: frontend 27 | enabled: false 28 | - 29 | name: menu_text 30 | additionalDataBind: "enable: data.menu_parent() === ''" 31 | tab: base 32 | - 33 | name: sort_order 34 | enabled: false 35 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/platform.yml: -------------------------------------------------------------------------------- 1 | sylius: 2 | code: sylius 3 | name: Sylius 4 | url: 'https://sylius.com/' 5 | image: 'bundles/umcsylius/logo/sylius.png' 6 | sort_order: 30 7 | unsupported_message: Sylius might be supported later. 8 | config: 9 | coding_standards: 10 | - PSR1 11 | - PSR2 12 | - PSR12 13 | module_factory: 'sylius.module.factory' 14 | form: 15 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/module.yml' 16 | - '%kernel.project_dir%/src/Umc/SyliusBundle/Resources/config/form/module.yml' 17 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/entity.yml' 18 | - '%kernel.project_dir%/src/Umc/SyliusBundle/Resources/config/form/entity.yml' 19 | - '%kernel.project_dir%/src/Umc/CoreBundle/Resources/config/form/attribute.yml' 20 | - '%kernel.project_dir%/src/Umc/SyliusBundle/Resources/config/form/attribute.yml' 21 | source: 22 | - '%kernel.project_dir%/src/Umc/SyliusBundle/Resources/config/source/module.yml' 23 | - '%kernel.project_dir%/src/Umc/SyliusBundle/Resources/config/source/entity.yml' 24 | versions: 25 | - 26 | label: 1.8+ 27 | code: 1-8 28 | sort_weight: 10 29 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/source/entity.yml: -------------------------------------------------------------------------------- 1 | - 2 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/doctrine/_Entity_.orm.xml" 3 | label: "Entity Doctrine declaration file" 4 | scope: entity 5 | - 6 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/grid/_entity_.yml" 7 | label: "Entity Grid declaration file" 8 | scope: entity 9 | - 10 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Entity/_Entity_.php" 11 | label: "Entity Model" 12 | scope: entity 13 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/config/source/module.yml: -------------------------------------------------------------------------------- 1 | - 2 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/composer.json" 3 | label: "Bundle composer file" 4 | - 5 | source: "@UmcSylius/source/config/packages/_namespace___modulename_.yml" 6 | label: "Bundle package file" 7 | - 8 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/_namespace___modulename_.yml" 9 | label: Bundle entities declaration file 10 | - 11 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/services.yml" 12 | label: Bundle services declaration 13 | - 14 | source: "@UmcSylius/source/config/routes/_namespace___modulename_.yml" 15 | label: Bundle routes declaration 16 | - 17 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/_Namespace__ModuleName_Bundle.php" 18 | label: Bundle declaration class 19 | - 20 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Menu/AdminMenuListener.php" 21 | label: Admin menu listener 22 | - 23 | source: "@UmcSylius/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/translations/messages.en.yml" 24 | label: Translation file 25 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/public/logo/sylius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UltimateModuleCreator/umc/08b222dd8d89e1f45b5721f3900a33d9377df097/src/Umc/SyliusBundle/Resources/public/logo/sylius.png -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/grid/date.html.twig: -------------------------------------------------------------------------------- 1 | {{ attribute.getCode()|camel }}: 2 | type: datetime 3 | label: {{ module.getModuleName()|snake }}.ui.{{ entity.getNameSingular()|snake }}.{{ attribute.getCode()|snake }} 4 | sortable: true 5 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/grid/default.html.twig: -------------------------------------------------------------------------------- 1 | {{ attribute.getCode()|camel }}: 2 | type: string 3 | label: {{ module.getModuleName()|snake }}.ui.{{ entity.getNameSingular()|snake }}.{{ attribute.getCode()|snake }} 4 | sortable: true 5 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/grid/yesno.html.twig: -------------------------------------------------------------------------------- 1 | {{ attribute.getCode()|camel }}: 2 | type: twig 3 | label: {{ module.getModuleName()|snake }}.ui.{{ entity.getNameSingular()|snake }}.{{ attribute.getCode()|snake }} 4 | options: 5 | template: "@SyliusUi/Grid/Field/yesNo.html.twig" 6 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/model/decimal.html.twig: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @return {{ attribute.getTypeInstance().getTypeHint() }}|null 4 | */ 5 | public function get{{ attribute.getCode()|camel|ucfirst }}(): ?{{ attribute.getTypeInstance().getTypeHint() }} 6 | { 7 | return $this->{{ attribute.getCode()|camel }} ? (float)$this->{{ attribute.getCode()|camel }} : null; 8 | } 9 | 10 | /** 11 | * @param {{ attribute.getTypeInstance().getTypeHint() }}|null ${{ attribute.getCode()|camel }} 12 | */ 13 | public function set{{ attribute.getCode()|camel|ucfirst }}(?{{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel }}): void 14 | { 15 | $this->{{ attribute.getCode()|camel }} = ${{ attribute.getCode()|camel }}; 16 | } 17 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/model/default.html.twig: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @return {{ attribute.getTypeInstance().getTypeHint() }}|null 4 | */ 5 | public function get{{ attribute.getCode()|camel|ucfirst }}(): ?{{ attribute.getTypeInstance().getTypeHint() }} 6 | { 7 | return $this->{{ attribute.getCode()|camel }}; 8 | } 9 | 10 | /** 11 | * @param {{ attribute.getTypeInstance().getTypeHint() }}|null ${{ attribute.getCode()|camel }} 12 | */ 13 | public function set{{ attribute.getCode()|camel|ucfirst }}(?{{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel }}): void 14 | { 15 | $this->{{ attribute.getCode()|camel }} = ${{ attribute.getCode()|camel }}; 16 | } 17 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/attribute/model/yesno.html.twig: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @return {{ attribute.getTypeInstance().getTypeHint() }}|null 4 | */ 5 | public function is{{ attribute.getCode()|camel|ucfirst }}(): ?{{ attribute.getTypeInstance().getTypeHint() }} 6 | { 7 | return $this->{{ attribute.getCode()|camel }}; 8 | } 9 | 10 | /** 11 | * @param {{ attribute.getTypeInstance().getTypeHint() }}|null ${{ attribute.getCode()|camel }} 12 | */ 13 | public function set{{ attribute.getCode()|camel|ucfirst }}(?{{ attribute.getTypeInstance().getTypeHint() }} ${{ attribute.getCode()|camel }}): void 14 | { 15 | $this->{{ attribute.getCode()|camel }} = ${{ attribute.getCode()|camel }}; 16 | } 17 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/config/packages/_namespace___modulename_.yml.html.twig: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@{{ module.getNamespace() }}{{ module.getModuleName() }}Bundle/Resources/config/{{ module.getNamespace()|snake }}_{{ module.getModuleName()|snake }}.yml" } 3 | - { resource: "@{{ module.getNamespace() }}{{ module.getModuleName() }}Bundle/Resources/config/services.yml" } 4 | {% for entity in module.getEntities() %} 5 | - { resource: "@{{ module.getNamespace() }}{{ module.getModuleName() }}Bundle/Resources/config/grid/{{ entity.getNameSingular()|snake }}.yml" } 6 | {% endfor %} 7 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/config/routes/_namespace___modulename_.yml.html.twig: -------------------------------------------------------------------------------- 1 | {% for entity in module.getEntities() %} 2 | {{ module.getNamespace()|snake }}_{{ module.getModuleName()|snake }}_{{ entity.getNameSingular()|snake }}_admin: 3 | resource: | 4 | alias: {{ module.getModuleName()|snake }}.{{ entity.getNameSingular()|snake }} 5 | section: admin 6 | templates: "@SyliusAdmin\\Crud" 7 | grid: {{ module.getNamespace()|snake }}_{{ module.getModuleName()|snake }}_{{ entity.getNameSingular()|snake }} 8 | permission: true 9 | except: ['show'] 10 | type: sylius.resource 11 | prefix: '/admin' 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Menu/AdminMenuListener.php.html.twig: -------------------------------------------------------------------------------- 1 | getMenu(); 13 | {% if module.getMenuParent() %} 14 | $parent = $menu->getChild('{{ module.getMenuParent() }}'); 15 | {% else %} 16 | $parent = $menu 17 | ->addChild('{{ module.getModuleName()|hyphen }}') 18 | ->setLabel('{{ module.getMenuText() }}'); 19 | {% endif %} 20 | {% for entity in module.getEntities() %} 21 | $parent 22 | ->addChild('{{ entity.getNameSingular()|hyphen }}', ['route' => '{{ module.getModuleName()|snake }}_admin_{{ entity.getNameSingular()|snake }}_index']) 23 | ->setLabel('{{ entity.getLabelPlural() }}') 24 | ->setLabelAttribute('icon', 'newspaper'); 25 | {% endfor %} 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/_namespace___modulename_.yml.html.twig: -------------------------------------------------------------------------------- 1 | sylius_resource: 2 | resources: 3 | {% for entity in module.getEntities() %} 4 | {{ module.getModuleName()|snake }}.{{ entity.getNameSingular()|snake }}: 5 | classes: 6 | model: App\{{ module.getNamespace() }}\Bundle\{{ module.getModuleName() }}Bundle\Entity\{{ entity.getNameSingular()|camel|ucfirst }} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/doctrine/_Entity_.orm.xml.html.twig: -------------------------------------------------------------------------------- 1 | 2 | {{ formatLicense(module, 'xml')|raw }} 3 | 4 | 5 | 6 | 7 | 8 | {% for attribute in entity.getAttributes() %} 9 | 10 | {% endfor %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/routing.yml.html.twig: -------------------------------------------------------------------------------- 1 | routes: 2 | {% for entity in module.getEntities() %} 3 | {{ module.getNamespace()|snake }}_{{ module.getModuleName()|snake }}_{{ entity.getNameSingular()|snake }}_admin: 4 | resource: | 5 | alias: {{ module.getNamespace()|snake }}_{{ module.getModuleName()|snake }}.{{ entity.getNameSingular()|snake }} 6 | type: sylius.resource 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/config/services.yml.html.twig: -------------------------------------------------------------------------------- 1 | services: 2 | {{ module.getModuleName()|snake}}.listener.admin.menu_builder: 3 | class: App\{{ module.getNamespace() }}\Bundle\{{ module.getModuleName() }}Bundle\Menu\AdminMenuListener 4 | tags: 5 | - { name: kernel.event_listener, event: sylius.menu.admin.main, method: addAdminMenuItems } 6 | 7 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/Resources/translations/messages.en.yml.html.twig: -------------------------------------------------------------------------------- 1 | {{ module.getModuleName()|snake }}: 2 | ui: 3 | {% for entity in module.getEntities() %} 4 | {{ entity.getNamePlural()|snake }}: "{{ entity.getLabelPlural() }}" 5 | new_{{ entity.getNameSingular()|snake }}: "New {{ entity.getLabelSingular() }}" 6 | {{ entity.getNameSingular()|snake }}: 7 | {% for attribute in entity.getAttributes %} 8 | {{ attribute.getCode() }}: "{{ attribute.getLabel() }}" 9 | {% endfor %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /src/Umc/SyliusBundle/Resources/views/source/src/_Namespace_/Bundle/_ModuleName_Bundle/_Namespace__ModuleName_Bundle.php.html.twig: -------------------------------------------------------------------------------- 1 | 17 | * 18 | */ 19 | 20 | declare(strict_types=1); 21 | 22 | namespace App\Umc\SyliusBundle; 23 | 24 | use Symfony\Component\DependencyInjection\ContainerBuilder; 25 | use Symfony\Component\HttpKernel\Bundle\Bundle; 26 | 27 | class UmcSyliusBundle extends Bundle 28 | { 29 | 30 | } 31 | --------------------------------------------------------------------------------