Download the PHP package renttek/magento2-virtual-controllers without Composer

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

Renttek_VirtualControllers

Enables creating of routes with "virtual controllers"

Build Status Latest Stable Version License

What is a virtual controllers? A virtual controller is a path + an optional layout handle which will be set. With that it is possible to create custom routes where you can place custom blocks to your wishes. (In Magento 2 this is currently only possible by creating a route.xml & a dummy controller action, which returns a \Magento\Framework\View\Result\Page)

Comparison

Here is a short comparison of the minimal required code to create a custom route (example/page/view) in Magento 2 (given there is already a module My_Module)

Vanilla Magento 2

/etc/frontend/routes.xml /Controllers/Page/View.php ### With this Module /etc/virtual_controllers.xml ## Features ### Handles Besides the much simpler creation of custom routes, every route will get a few layout handles set: * "default" * "virtual_controller" * The given path, but all characters except `[a-z_]` are replaced by underscores. (`example/page/view` => `example_page_view`) The generated handle can also be set manually in the xml configuration like this: /etc/virtual_controllers.xml Routes can also be disabled by setting `disabled=true` in the configuration: ### Forwards Another feature is the possibility of creating forwards without creating a controller. Forwards are needed if you want to display another URL for a page. (e.g. 'my/shoppingcart' => 'checkout/cart') In V1 the attributes `controller` and `action` defaulted to 'index' if not specified. In V2 this is not the case! Forwards are only URLs/path that **CAN** be called. It does not extend/manipulate url generation in any way. ---- All routes are merged by the path attribute, so it is possible to disable routes from other modules.

All versions of magento2-virtual-controllers with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1
ext-dom Version *
magento/framework Version >=100.0
magento/module-url-rewrite Version >=100.0
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 renttek/magento2-virtual-controllers contains the following files

Loading the files please wait ....