Download the PHP package hryvinskyi/magento2-configuration-fields without Composer
On this page you can find all versions of the php package hryvinskyi/magento2-configuration-fields. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hryvinskyi/magento2-configuration-fields
More information about hryvinskyi/magento2-configuration-fields
Files in hryvinskyi/magento2-configuration-fields
Package magento2-configuration-fields
Short Description Configuration field types for the Magento 2 admin: a tag list with JSON, serialized or separated storage, a cron expression editor and CodeMirror code editors, drawn with the shared admin UI kit
License MIT
Informations about the package magento2-configuration-fields
Magento 2 Stores Configuration Elements Fields
A Magento 2 module that provides enhanced UI elements for the Stores > Configuration section, including a user-friendly cron expression editor field.
Features
- Cron Expression Editor: Interactive, validated, and human-readable cron field for system configuration.
- Catalog Category Selector: A custom field type for selecting categories in the system configuration.
- Tag List Input: Tag-style input for managing lists of values (postcodes, SKUs, keywords, etc.).
- CodeMirror Editor: Syntax-highlighted code editor supporting multiple languages (CSS, JavaScript, HTML, PHP, SQL, YAML, etc.).
- Modern UI/UX with real-time validation and summary.
Installation
Via Composer
Manual Installation
- Copy the module to
app/code/Hryvinskyi/ConfigurationFields. - Run the following Magento CLI commands:
How It Works
- The module adds a new system configuration field type that renders a cron editor UI.
- The editor provides validation, error highlighting, and a summary of the cron schedule.
- The value is stored as a standard cron expression string.
Example system.xml Usage
Tag List Configuration via DI
For custom TagList configuration, create virtual types in your module's di.xml:
Step 1: Create virtual types in di.xml
Step 2: Reference in system.xml
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
placeholder |
string | "Type value and press Enter..." | Input placeholder text |
validation |
string | ^[A-Za-z0-9]+$ |
Regex pattern for validation |
uppercase |
boolean | true | Auto-uppercase input values |
separator |
string | \n |
Separator for values (\n, \t, ,, etc.) |
save_type |
string | separator | Storage format: json, serialized, or separator |
Storage Formats
| Save Type | Description | Storage Example |
|---|---|---|
separator |
Values separated by a character (default) | VALUE1\nVALUE2\nVALUE3 |
json |
JSON array format | ["VALUE1","VALUE2","VALUE3"] |
serialized |
PHP serialized format | a:3:{i:0;s:6:"VALUE1";...} |
Complete Example
di.xml:
system.xml:
CodeMirror Editor Classes
The module provides pre-built CodeMirror editor classes for common languages in the CodeMirror namespace. Use them directly in your system.xml:
Namespace: Hryvinskyi\ConfigurationFields\Block\Adminhtml\System\Config\Form\Field\CodeMirror\
Available Editor Classes:
| Class | Language | Mode |
|---|---|---|
CssEditor |
CSS | css |
LessEditor |
LESS | text/x-less |
ScssEditor |
SCSS | text/x-scss |
JavascriptEditor |
JavaScript | javascript |
JsonEditor |
JSON | application/json |
HtmlEditor |
HTML (mixed) | htmlmixed |
XmlEditor |
XML | xml |
PhpEditor |
PHP | php |
SqlEditor |
SQL | sql |
YamlEditor |
YAML | yaml |
MarkdownEditor |
Markdown | markdown |
ShellEditor |
Shell/Bash | shell |
Usage in system.xml:
Custom CodeMirror Configuration via DI
For custom configuration (theme, options), create virtual types in your module's di.xml:
Configuration Options:
| Option | Type | Default | Description |
|---|---|---|---|
mode |
string | (per class) | Syntax highlighting mode |
theme |
string | default |
Editor color theme |
line_numbers |
boolean | true |
Show line numbers |
line_wrapping |
boolean | true |
Wrap long lines |
Available Themes:
default- Light theme (default)monokai- Dark theme with vibrant colorsmaterial- Material Design inspireddracula- Dark purple theme
CodeMirror UI Component Usage
For UI component forms (admin forms, not system configuration), use the CodeMirror form element.
In your UI component XML:
Screenshots
Support
For issues, questions or contributions, please contact the author or create an issue in the GitHub repository.
Author
- Volodymyr Hryvinskyi
- Email: [email protected]
- GitHub: https://github.com/hryvinskyi
License
This project is licensed under the MIT License.
All versions of magento2-configuration-fields with dependencies
ext-mbstring Version *
hryvinskyi/magento2-admin-ui Version ^1.0
magento/framework Version *
magento/module-backend Version *
magento/module-catalog Version *
magento/module-config Version *
magento/module-store Version *
magento/module-ui Version *
psr/log Version *