Download the PHP package fontis/customergroupaccess-mage2 without Composer

On this page you can find all versions of the php package fontis/customergroupaccess-mage2. 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 customergroupaccess-mage2

Fontis Magento 2 Customer Group Access

This is a standalone package designed to help extensions limit access to functionality such as payment methods to certain customer groups.

This is NOT a Magento 2 extension. It will not do anything by itself. It is intended for developers to use while implementing extensions.

The recommended way to install this package is to make your extension depend on this package in its composer.json file. To do so, add the following line to the require section of the file:

Once you've added this package as a dependency, follow these instructions for actually using the package within your extension:

  1. Add two settings to your system.xml file, using the relevant source models:

    • This customer_group_access with Fontis\CustomerGroupAccess\Source\CustomerGroupAccess
    • That customer_group with Fontis\CustomerGroupAccess\Source\CustomerGroup
  2. In your di.xml file, define a virtualType. The configPathPrefix should be the section and group IDs that contain the settings you added above.

    Using this example, the full path to one of the settings would be like so:

  3. Use the virtualType to configure the model where your access checks need to be performed:

  4. In your model's constructor, accept this class as one of the arguments:

  5. When you actually need to perform the access check, use the factory to create an instance of the access check class. If you need to perform the check in the context of a store that isn't the current store, you'll need to pass in a store ID:

  6. Perform the check by calling the check() method and passing it a customer group ID. If it returns true, they're allowed to use whatever it is you're offering. If it returns false, they aren't. Simple!

All versions of customergroupaccess-mage2 with dependencies

PHP Build Version
Package Version
Requires php Version ~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0
magento/framework Version 100.*|101.*|102.*|103.*
magento/module-customer Version 100.*|101.*|102.*|103.*
magento/module-store Version 100.*|101.*|103.*
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 fontis/customergroupaccess-mage2 contains the following files

Loading the files please wait ....