Download the PHP package mage-os/module-advanced-widget without Composer

On this page you can find all versions of the php package mage-os/module-advanced-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-advanced-widget

MageOS AdvancedWidget Module for Magento

Add configurable multi-row CMS Widgets with image picker component, product picker component, select fields and much more.


Overview

The AdvancedWidget module allows you to define multi-row CMS widgets. These features combined with MageOS_PageBuilderWidget module (that is explicit dependency) make finally possible to develop custom pagebuilder components with own preview and a large set of configurations. Complex pagebuilder ui components development is no more needed.

🚀 Features

1) This module let you specify Title separators inside widgets

2) This module let you specify multiple "repeatable" sections where you can specify unlimited rows inside widgets

2.1) Each item field can receive a dedicated tooltip

2.2) Each field is validated and ask to be required for compilation

2.3) Items can be sorted

2.4) You can specify whether a field is editable directly in the main box or whether it must be edited in the detail modal.

3) Row item images fields are available

4) Row item select fields are available

5) Row item product fields are available

6) Row item wysiwyg and colorpicker fields are also available (see the field reference below)

📖 Field reference

Two kinds of fields exist:

  1. Widget parameter fields — declared in your module's etc/widget.xml as xsi:type="block" parameters pointing at a renderer class from MageOS\AdvancedWidget\Block\WidgetField\*. On the frontend the value arrives as plain block data ($block->getData('name')).
  2. Repeatable row fields — declared in PHP inside a Rows subclass; editors can add, sort and delete unlimited rows, each row containing these fields.

Widget parameter fields

Image — Block\WidgetField\Image

Renders a text input with a "Choose Image..." button that opens the Magento media gallery browser. Stores the media-relative path (e.g. wysiwyg/hero/image.jpg) as a plain string.

On the frontend, resolve the stored path with $block->getImageUrl('image') (from Block\Widgets\AbstractColumns) — it prefixes the store media base URL when the value isn't already absolute.

TextArea — Block\WidgetField\TextArea

Plain multi-line text input (no HTML editor). Line breaks are preserved in the stored value.

WYSIWYG — Block\WidgetField\Wysiwyg

Full TinyMCE editor (variables and images enabled, nested widgets disabled). The stored value is HTML — don't escapeHtml it on the frontend; sanitize it instead, e.g. with Block\Widgets\Template::stripTags(), which ships with a sensible default tag whitelist.

Title separator — Block\WidgetField\Title

Purely visual: renders a heading/divider inside the widget form to group fields. It stores no meaningful value — the displayed text comes from the parameter's <description>. Don't read this parameter on the frontend.

Repeatable rows — Block\WidgetField\Rows

The headline feature: unlimited sortable rows, each with its own field set. The parameter name must start with repeatable_ — both the save plugin (Plugin\SaveRepeatableItems) and the admin renderer detect repeatable values by that prefix. A widget can have several repeatable parameters, each with its own Rows subclass.

Repeatable row fields

Extend MageOS\AdvancedWidget\Block\WidgetField\Rows and fill the $rows property — an ordered map of field_key => config:

Row config keys

Key Meaning
label Admin label for the field
type One of the row field types below
required Adds admin-side validation on the row
preview true → editable directly in the collapsed row list; false → only in the row's edit modal
description Tooltip text next to the field
options value => label map, select type only
default Starting color for a colorpicker field, e.g. #FF0000 or rgba(0,0,0,1); falls back to #FFFFFF

Row field types

Type Admin control Stored value
text Single-line text input Plain string
textarea Multi-line text input Plain string, line breaks preserved
select Dropdown built from the options map The selected option value
image Media gallery browser button Media-relative path (resolve with getImageUrlByPath())
product Product chooser grid Product ID — see below
wysiwyg TinyMCE editor in the row modal HTML string (same escaping caveats as the WYSIWYG parameter)
colorpicker JSColor picker (rgba format); starting color set via the row's default key CSS color string, e.g. rgba(255,255,255,1)

Notes:

Reading values on the frontend

Extend MageOS\AdvancedWidget\Block\Widgets\AbstractColumns in your widget block:

Available helpers:

Method Purpose
getRepeatableField($name) Decoded array of row arrays for a repeatable parameter
getRepeatableFieldAsObject($name) Same rows as DataObjects ($item->getTitle())
getImageUrl($field) / getImageUrlByPath($path) Resolve a stored media-relative path into a full media URL
getPreparedUrl($url) Normalize relative link values against the store base URL
getPreparedDescription($field) Replace \EOL markers with <br />

🔧 Installation

  1. Install it into your Mage-OS/Magento 2 project with composer:

  2. Enable module

🤝 Changelog

Please see CHANGELOG for more information on what has changed recently.

📄 License

The MIT License (MIT). Please see License File for more information.

Attribution

This software uses Open Source software. See the ATTRIBUTION page for these projects.


All versions of module-advanced-widget with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
magento/module-widget Version *
magento/module-page-builder Version ^2.0
mage-os/module-page-builder-widget Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mage-os/module-advanced-widget contains the following files

Loading the files please wait ...