Download the PHP package mage2kishan/module-core without Composer

On this page you can find all versions of the php package mage2kishan/module-core. 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-core

Magento 2 Panth Core

Panth Core (Panth_Core) is the shared base module for the Panth extensions for Magento 2. It provides the "Panth Extensions" configuration tab and the "Panth Infotech" admin menu that the other modules attach to, configuration and theme detection helpers, Content Security Policy settings, an upload extension deny-list, shared frontend assets and a few service contracts. Every other mage2kishan package requires it, so Composer installs it automatically as a dependency.

The module makes no outbound network requests.

Features

Compatibility

Component Supported versions
Magento Open Source 2.4.4 to 2.4.8
Adobe Commerce 2.4.4 to 2.4.8
PHP 8.1, 8.2, 8.3, 8.4

Composer constraints: magento/framework ^103.0, magento/module-backend ^102.0, magento/module-checkout ^100.4, magento/module-config ^101.2, magento/module-csp ^100.4, magento/module-store ^101.1, magento/module-theme ^101.1.

Requirements

Hyva is optional. The heroIcon view model registration and the child theme checks are aimed at Hyva stores; the other features work on Luma as well.

Installation

Panth Core is normally installed automatically when you install any Panth package with Composer. To install it on its own:

Run setup:di:compile only when the store is in production mode. Check that the module is enabled:

Configuration

Admin path: Stores > Configuration > Panth Extensions > Core Settings

The tab label in etc/adminhtml/system.xml starts with an emoji, which is left out here.

General Configuration

Field Type Default Config path
Enable Panth Core Yes/No not set in config.xml panth_core/general/enabled
Debug Mode Yes/No not set in config.xml panth_core/general/debug_mode
Enable Caching Yes/No not set in config.xml panth_core/general/cache_enabled

All three fields can be set at default, website and store view scope. When Debug Mode is on, Helper\Data::log() writes messages prefixed with "Panth Core:" to the Magento log.

Child Theme Validation

Default scope only. A read-only panel that shows the active frontend theme, its parent chain and the result of each check, with "Validate Theme Setup" and "Rebuild Theme CSS" buttons.

Child Theme Setup Guide

Default scope only. Step-by-step instructions for creating a child theme of Panth/Infotech.

Content Security Policy

Field Type Default Config path
Additional Image / Connect Hosts Text empty panth_core/csp/additional_image_hosts

Can be set at default, website and store view scope.

Module Information

Default scope only. "Version" shows Panth Core v<version>, read from the version field of the module's composer.json. "Support" shows the support email address.

Usage

Admin tab and menu

After installation the configuration page has a "Panth Extensions" tab containing "Core Settings". Each Panth module you install adds its own section to this tab. The admin sidebar gets a "Panth Infotech" item; Panth Core adds only the "Core Settings" link, and other Panth modules add their own groups and items under it.

Content Security Policy hosts

Panth Core ships a CSP whitelist with these hosts:

Directive Hosts
style-src cdnjs.cloudflare.com, cdn.jsdelivr.net, fonts.googleapis.com, fonts.bunny.net, *.fontawesome.com
font-src cdnjs.cloudflare.com, cdn.jsdelivr.net, fonts.gstatic.com, fonts.googleapis.com, fonts.bunny.net, *.fontawesome.com
script-src cdnjs.cloudflare.com, cdn.jsdelivr.net, js.mollie.com, www.google.com, www.gstatic.com
img-src www.google-analytics.com, www.googletagmanager.com, cdn.jsdelivr.net
connect-src js.mollie.com, www.google-analytics.com, www.googletagmanager.com
frame-src js.mollie.com, www.google.com, .paypal.com, .braintreegateway.com

Use "Additional Image / Connect Hosts" when product descriptions or other content load images or make requests to an external origin that the storefront CSP blocks. Enter hostnames separated by commas or spaces, for example cdn.example.com, *.images.example.com. Each entry is added to both img-src and connect-src; entries that are not valid host expressions are ignored, and an empty field adds nothing. Clean the configuration and full page caches after saving.

For any other directive, add a csp_whitelist.xml to one of your own modules rather than editing this module.

Panth Core also sets the checkout page (storefront_checkout_index_index) CSP mode to report-only in etc/config.xml, so inline scripts from third-party checkout modules are reported instead of blocked. Override csp/mode/storefront_checkout_index_index/report_only if you need the policy enforced on checkout.

Upload extension policy

Security\UploadExtensionPolicy rejects a file name when its extension is empty or is one of: php, phtml, phar, php3, php4, php5, php7, php8, phps, pht, phpt, inc, htaccess, htpasswd, shtml, cgi, pl, py, sh, asp, aspx, jsp. The check is case-insensitive and uses the last extension of the name. A denied extension followed by trailing dots or whitespace (for example shell.php) is also rejected, as is any name that contains a NUL byte. assertSafeExtension() throws a LocalizedException with the message "This file type is not allowed."; isSafeExtension() returns a boolean. Panth modules call it in their upload handlers in addition to their own allowed-type lists.

Child theme rebuild

The "Rebuild Theme CSS" button calls ThemeBuildExecutorInterface::exportAndBuild(). Without Panth_ThemeCustomizer installed, the default implementation returns a message saying that module is not installed or is disabled and performs no build.

Developer Notes

Classes and files other modules depend on:

Class / file Purpose
Panth\Core\Helper\AbstractConfig Abstract config helper with getConfig() and isSetFlag() at store scope; subclasses implement getConfigValue() and isEnabled().
Panth\Core\Helper\Theme isHyva(), isLuma(), getCurrentTheme(), getTemplateForTheme(), useAlpineJs(), useKnockoutJs(), resetCache().
Panth\Core\ViewModel\ThemeConfig Modules register themselves through the registeredModules argument in their own etc/frontend/di.xml; provides getCssVariables() and getValue() (dot-separated path).
Panth\Core\ViewModel\HeroIcon getIcon($name, $class, $type), hasIcon(), getAvailableIcons() and named shortcuts such as menu(), close(), search(), whatsapp(). Registered as heroIcon in the Hyva ViewModelRegistry.
Panth\Core\Security\UploadExtensionPolicy Upload extension deny-list (see above).
Panth\Core\Api\ThemeBuildExecutorInterface exportAndBuild(bool $forceNpmBuild = false): array returning success, message and optional output. The default DI preference is Panth\Core\Model\NoopThemeBuildExecutor; Panth_ThemeCustomizer overrides it.
Panth\Core\Model\Config\Backend\Base Config backend model used by dependent modules.
Panth\Core\Block\Adminhtml\System\Config\ChildThemeValidation Frontend model for the child theme validation panel.
Panth\Core\Model\Csp\AdditionalHostsCollector CSP policy collector added to Magento\Csp\Model\CompositePolicyCollector.
Panth\Core\Model\ModuleRegistry Reads and caches the merged etc/panth_modules.xml files (name, config_section, enabled); schema in etc/panth_modules.xsd.
view/frontend/web/js/swiper-bundle.min.js, view/frontend/web/css/swiper-bundle.min.css Swiper 11.2.10, available as the static assets Panth_Core::js/swiper-bundle.min.js and Panth_Core::css/swiper-bundle.min.css.

Helper\License, Helper\ModuleLicenseValidator, Service\LicenseValidator, Service\ValidationCache, Service\DomainWhitelist, the abstract observers Observer\ModuleLicenseCheck and Observer\ModuleConfigSaveObserver, and the frontend models Block\Adminhtml\System\Config\LicenseInfo and LicenseStatus are kept for compatibility with older module versions that may still reference them. They perform no license check and always report a valid result.

The module registers no event observers, has no license endpoints and adds no script to the admin configuration pages.

Frontend plugin Panth\Core\Plugin\InitViewBeforePagePlugin on Magento\Framework\View\Result\PageFactory::create() and Magento\Framework\Controller\ResultFactory::create() (page results only) creates Magento\Framework\App\ViewInterface before a controller builds its result page. Without it, a controller that does not extend Magento\Framework\App\Action\Action can get its layout generated twice and lose the blocks in head.additional.

ACL resources:

Admin route: panthcore (child theme validate and rebuild actions, POST only; these are the only admin actions of the module).

Database: the module declares no tables. etc/db_schema_whitelist.json still lists panth_core_notification and panth_core_notification_display, so bin/magento setup:upgrade drops those two tables on stores upgrading from 1.1.x. Run setup:upgrade --safe-mode=1 if you want Magento to back up their rows first.

Unit tests are in Test/Unit and cover Helper\Color, Plugin\InitViewBeforePagePlugin, the module registry converter, AdditionalHostsCollector, NoopThemeBuildExecutor and UploadExtensionPolicy.

Uninstallation

Every Panth module requires Panth Core. Remove all other mage2kishan packages first; Composer will refuse to remove Panth Core while any of them is still installed.

Support

Documentation

See USER_GUIDE.md for the administrator guide.

License

Commercial software license. See LICENSE.txt in this repository.

Changelog

See CHANGELOG.md.

Links


All versions of module-core with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
magento/framework Version ^103.0
magento/module-backend Version ^102.0
magento/module-checkout Version ^100.4
magento/module-config Version ^101.2
magento/module-csp Version ^100.4
magento/module-store Version ^101.1
magento/module-theme Version ^101.1
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 mage2kishan/module-core contains the following files

Loading the files please wait ...