Download the PHP package scriptua/magento2-base without Composer

On this page you can find all versions of the php package scriptua/magento2-base. 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 magento2-base

Magento 2 Base Module

A comprehensive Magento 2 base module providing:

Installation Guide

Table of Contents

  1. Core Features
    • ViewModel Registry
    • Layout Debugging
    • Extensible Admin Menu
  2. Yii2 Framework Helpers
    • ArrayHelper
    • Html
    • Json
    • VarDumper
  3. Console Utilities
  4. Requirements
  5. License

Core Features

1. ViewModel Registry ($viewModels)

Access any view model directly in templates without declaring them in layout XML. The $viewModels variable is automatically available in all .phtml templates.

Usage in templates:

How it works:

Cache handling for ESI blocks:

2. Layout Debugging (Developer Mode Only)

Automatic layout debugging tools enabled when Magento is in developer mode.

Features:

Automatically enabled when:

Configuration: The debugging information is controlled by Hryvinskyi\Base\Helper\Config:

What you get:

3. Extensible Admin Menu

A reusable dropdown menu component for Magento admin pages that can be configured entirely via layout XML. Perfect for creating navigation menus in custom admin modules.

Features:

Basic Usage in Layout XML:

Creating a Reusable Menu Handle:

Create a shared layout handle file (e.g., mymodule_menu.xml) to avoid duplication:

Then include it in your page layouts:

Menu Item Configuration Options:

Option Type Required Description
label string Yes Menu item text (supports translation with translate="true")
route string Yes Magento route path (e.g., module/controller/action)
route_params array No Route parameters (e.g., section, id)
sort_order number No Order of items (default: 0, lower = first)
class string No CSS class(es) for the menu item
icon string No SVG or HTML icon content
is_active boolean No Show/hide item (default: true)

Custom Menu Icon:

Menu Item with Icon:

Yii2 Framework Helper Classes

This module provides proven, battle-tested helper classes from the Yii2 framework, adapted for Magento 2.

ArrayHelper

Comprehensive array manipulation utilities with 30+ methods for working with arrays and objects.

Key Methods:

Method Description
getValue($array, $key, $default) Retrieve nested values using dot notation (user.address.street)
setValue(&$array, $key, $value) Set nested values using dot notation
remove(&$array, $key, $default) Remove and return array element
merge($a, $b) Recursively merge arrays with smart key handling
index($array, $key) Index/group arrays by specified keys
getColumn($array, $name) Extract column values from multidimensional arrays
map($array, $from, $to, $group) Build key-value maps from arrays
filter($array, $filters) Filter array using dot notation rules
multisort(&$array, $key, $direction) Sort by multiple keys with different directions
toArray($object, $properties, $recursive) Convert objects to arrays with property mapping
isAssociative($array, $allStrings) Check if array is associative
isIndexed($array, $consecutive) Check if array is indexed
htmlEncode($data, $valuesOnly, $charset) Encode HTML entities recursively
htmlDecode($data, $valuesOnly) Decode HTML entities recursively
keyExists($key, $array, $caseSensitive) Check key existence with case options
isIn($needle, $haystack, $strict) Check value membership
isSubset($needles, $haystack, $strict) Check if all values exist

Advanced Features:

Usage Examples:

Html

HTML generation helper with 40+ methods for programmatic HTML creation and manipulation.

Element Generation:

Form Generation:

Lists and Selections:

Asset Tags:

CSS/Style Manipulation:

Utilities:

Usage Examples:

Json

JSON encoding/decoding utilities with enhanced error handling and features beyond native PHP JSON functions.

Features:

Methods:

Properties:

Usage Examples:

VarDumper

Advanced variable dumping for debugging with syntax highlighting and circular reference handling.

Features:

Methods:

Usage Examples:

Console Utilities (ConsoleHelper)

Comprehensive ANSI terminal control for CLI commands with 30+ methods for creating rich console applications.

Categories:

Cursor Control

Screen Control

Colors & Formatting

Color Constants:

Usage:

Input/Output

Progress Bars

Utilities

Complete CLI Example

Requirements

License

This module contains code from two sources with dual licensing:

Yii2 Framework Helpers (BSD-3-Clause License)

The helper classes (ArrayHelper, Html, Json, VarDumper, ConsoleHelper) are derived from the Yii2 Framework and are licensed under the BSD-3-Clause License.

Magento 2 Modifications (MIT License)

Modifications, adaptations for Magento 2 compatibility, and original features (ViewModelRegistry, ViewModelCacheTags, layout debugging, etc.) are licensed under the MIT License.

Usage Rights

You are free to use, modify, and distribute this module under the terms of both licenses. The BSD-3-Clause license applies to the Yii2-derived code, and the MIT license applies to the Magento 2 adaptations and original features.

FOSSA Status


All versions of magento2-base with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
magento/framework 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 scriptua/magento2-base contains the following files

Loading the files please wait ...