Download the PHP package richardhj/contao-simple-ajax without Composer

On this page you can find all versions of the php package richardhj/contao-simple-ajax. 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 contao-simple-ajax

SimpleAjax for Contao Open Source CMS

SimpleAjax provides an endpoint for Ajax endpoints.

While it has been very convenient for Contao 3, this extension is not required for Contao 4 anymore. You should only use this extension in case your extension needs to be compatible with Contao 3 and Contao 4. Find the upgrade instructions below.

Changelog

v1.1.0 introduces the SimpleAjax\Event\SimpleAjax. You are able to register an event listener. If you're not using composer, you might want to use v1.0 instead and use the legacy hooks.

v1.2.0 lets you set an Response instance (from the symfony/http package). This was introduced to prepare a smooth upgrade process to Contao 4.

v1.3.0 is the Contao 4 release with equal features. The extension will not include any features as Contao 3 is approaching EOL.

Usage

Per Event

At first: Listen on the event SimpleAjax\Event\SimpleAjax using one method described here.

Either: Set a Response (recommended)

Or: Handwritten response with termination (legacy)

Per Hook (legacy)

Upgrade to Contao 4

This extension has been very convenient for Contao 3. While upgrading to Contao 4, you are advised to use the routing features coming with Contao 4.

In case you want to build an AppBundle (that's most probably true if you are no extension developer): Create an AppBundle

Implement the RoutingPluginInterface in your Contao Manager Plugin and load the routing.yml with the getRouteCollection().

Create a routing.yml, e.g. in the directory src/AppBundle/Resources/config/routing.yml

Put the following content:

Create the AppBundle\Controller\AjaxTagsController.php.

You can use https://github.com/richardhj/isotope-klarna-checkout/blob/v1.0/src/Controller/Push.php as a boilerplate.

The __invoke() method contains all the parameters that are mentioned in the path of the routing definition (routing.yml).


All versions of contao-simple-ajax with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
contao/core-bundle Version ^4.4
symfony/http-foundation Version ^3.3 || ^4.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 richardhj/contao-simple-ajax contains the following files

Loading the files please wait ....