Download the PHP package acseo/select-autocomplete-bundle without Composer

On this page you can find all versions of the php package acseo/select-autocomplete-bundle. 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 select-autocomplete-bundle

ACSEO SELECT AUTOCOMPLETE BUNDLE

Build Status

Introduction

This bundle helps you to build autocomplete fields in your symfony forms without declaring any controller or action.

Fully configurable, you can override any part of the autocompletion process very easily.

Doctrine ORM & ODM are supported by default, but you can create your own providers for other extensions !

Installation

Install source code with composer :

Enable the bundle :

Use the bundle form theme globally (or locally in your templates) :

Usage:

Let's start by a simple example :

With your favorite js library, transform the rendered input to autocomplete input (example with select2) :

Please note 3 important things in this js example :

Your autocomplete is now functional !

Form options

Name Type Required Default Description
class string yes null The model class supposed to be autocompleted
properties string array no id The properties used in database query to filter search results of autocomplete action. This properties can be nested with path like "nestedProperty.property".
display string callable array no properties The displayable properties used to build label of selectable choices. This properties can be nested with path like "nestedProperty.property".
strategy string no contains The strategy used to filter search results (allowed : starts_with / ends_with / contains / equals).
multiple bool no false Is collection field.
format string callable no json Default format used to encode choices of autocomplete response. Values allowed are provided by your own serializer (basically json / xml / csv / yaml in symfony serializer). Use callable to override encoding process.
identifier string no id Name of your model identifier property (will be used as value of each choice option).
autocomplete_url string no request.pathInfo The entrypoint where autocomplete results can be retrieved. By default we use the route where the form has been built. This value will be set in attribute "data-autocomplete-url" of field input.
transformer boolean object no ModelTransformer Disable/Override the form type transformer. If this value is false, transformer deals only with the identifier(s) value(s) (useful for filters).
provider string callable array object no null Create your own custom queries or specify a provider to use.

Tips : You can also override any part of the process more globally by creating a class which extends AutocompleteType.

class

properties

display

strategy

multiple

format

identifier

autocomplete_url

Sometimes you will need this option to retrieve search results from specific entrypoint.

transformer

provider

Providers

Providers classes are used to retrieve search results form database and transform form view data to model object.

2 Doctrine providers are included by default : ORMDataProvider and ODMDataProvider which supports multiple db connexions.

You can create your own provider for specific model class or specific database. This is an arbitrary example :

Finally, tag this service with acseo_select_autocomplete.data_provider.

Now, this provider will be invoked by default if it supports the given model class.


All versions of select-autocomplete-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
symfony/dependency-injection Version ^3.4 || ^4.0 || ^5.0
symfony/form Version ^3.4 || ^4.0 || ^5.0
symfony/serializer Version ^3.4 || ^4.0 || ^5.0
symfony/property-access Version ^3.4 || ^4.0 || ^5.0
symfony/flex Version ^1.3.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 acseo/select-autocomplete-bundle contains the following files

Loading the files please wait ....