Download the PHP package wemea/sylius-menu-plugin without Composer

On this page you can find all versions of the php package wemea/sylius-menu-plugin. 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 sylius-menu-plugin

License CI - Build Version Total Downloads

Sylius Menu Plugin

Plugin allow to manage Shop menus from the Back Office

Features:

Summary

  1. Installation
  2. Usage
    1. Add new menu
    2. Change default route mapping
    3. Add Custom resource link
  3. Use menu fixtures

Installation

  1. Require plugin with composer:

  2. Add followings to your config/bundles.php if not already automatically added:

  3. Import config in your config/packages/_sylius.yaml:

  4. Import routes in your config/routes.yml:

  5. Add menus into your template. Check Usage - Add a menu for more information

  6. Run integration test.

    :warning: There are integration tests only for admin part. You should add your owned tests for shop part.

Usage

Add a menu

Tips :

Menus can only be created and removed with Symfony command to avoid shop admin removed accidentally a menu and block the UI. Menus can be disabled on the BO.

  1. Create new menu

    Run bin/console wemea:menu:create <your_menu_code>

    You can run bin/console wemea:menu:create --help to view available options

  2. Add this menu in your template: add this where you want to introduce menu to your page(s)

    By default, the menu use @WemeaSyliusMenuPlugin/Shop/Menu/_default.html.twig. If you want to use your own template, add tempalte option on render :

  3. Add behat test to check menu integration

    You can view full integration on this folder

Change default resource route mapping

If you change defaults routes of application, you need to change route mapping of link resources. You can do it on config/packages/wemea_sylius_menu.yml with this configuration :

Parameters node is an associative array between route parameter and the method name to access at the resource property

Add new link type to another resource

This plugin allows creating new resource link. You may need it to redirect on custom resource (like brand, we use this example for instruction example)

  1. Override the default MenuLink entity:

  2. Declare this entity as resource model into config/packages/_sylius.yml

  3. Add form extension for Wemea\SyliusMenuPlugin\Form\Type\MenuLinkType with (autocomplete ?) choice type. Check official documentation create form extension.

    This field should NOT be mapped

    This new field is automatically add to template. By default, it uses : {{ form_row(form.brand) }}.

    If you want use a custom template, you can create templates/bundles/WemeaSyliusMenuPlugin/Admin/MenuLink/Form/Fields/_<field_name>.html.twig and use field with the property form.

  4. Add routing configuration on config/packages/wemea_sylius_menu.yml

  5. Clear cache and make migration to update schema

Use menu fixtures

If you need to load menu programmatically, you can use menu fixture like it :

To see a full implementation example, you can check the file footer_help_menu.yaml.

Issues / Remaining work


All versions of sylius-menu-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
sylius/mailer-bundle Version ^1.8 || ^2.0@beta
sylius/sylius Version ^1.12
symfony/webpack-encore-bundle Version ^1.15
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 wemea/sylius-menu-plugin contains the following files

Loading the files please wait ....