Download the PHP package alterphp/easyadmin-extension-bundle without Composer

On this page you can find all versions of the php package alterphp/easyadmin-extension-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 easyadmin-extension-bundle

EasyAdmin Extension

Latest Stable Version Build Status SensioLabsInsight Coverage Status MIT Licensed

EasyAdmin Extension provides some useful extensions to EasyAdmin admin generator for Symfony.

Features

Installation

Step 1: Download the Bundle

This command requires you to have Composer installed globally, as explained in the Composer documentation.

Step 2: Enable the Bundle

Step 3: Replace EasyAdmin controller

Instead of loading routes from EasyAdminBundle EasyAdminController, load them from EasyAdminExtensionBundle EasyAdminController.

If you have defined your own admin controllers, make them extend EasyAdminExtensionBundle EasyAdminController.

Features

List filters form

Add filters on list views by configuration.

Consider following Animation entity using such ValueListTrait :

Define your filters under list.form_filters entity configuration

Let's see the result !

Automatic list filter guesser

Guesser for list form filters are based on mapped entity property :

Filters form's method is GET and submitted through form_filter parameter. It is transmitted to the referer used for post update/delete/create redirection AND for search !

List filter operator

By default, list filter use equals operator or in for multiple value filters.

But you can use more operators with the operator attribute :

Available built-in operators are listed in AlterPHP\EasyAdminExtensionBundle\Model\ListFilter class, as constant OPERATOR_* :

Filter list and search on request parameters

This extension allows to dynamically filter lists by adding ext_filters parameter in the URL parameters. Having a list of books at URL <url-to-admin>?action=list&entity=Book with a releaseYear field, you can filter on books releasd in 2016 by requesting <url-to-admin>?action=list&entity=Book&ext_filters[entity.releaseDate]=2016. It only matches exact values, but you can chain them. To request books released in 2015 and 2016, you must request <url-to-admin>?action=list&entity=Book&ext_filters[entity.releaseDate][]=2015&ext_filters[entity.releaseDate][]=2016.

This ext_filters parameter is transmitted to the referer used for post update/delete/create redirection AND for search !

Register your own form types with a short name (aliasing form types)

You have custom form types that you want to use in the EasyAdmin configuration. You can already register them with FQCN ... but it's quite boring and makes the admin massively enlarged. This feature allows you to define your own form types with short names, by configuration.

Let's see how to register them with those 2 examples (enum and statusable) :

Embed lists in edit and show views

Options

Embedded lists are useful to show relations to en entity in its NEW/EDIT/FORM or SHOW view. It relies on the LIST view of the related entities you want to embed in the parent EDIT/SHOW view. Options must be defined in type_options key for a NEW/EDIT/FORM view, or in template_options for a SHOW view.

Available options are :

Options guesser based on ORM metadata

Service EmbeddedListHelper is intended to guess entity entry for embedded_list. It's reads ORM metadata, based on parent entity (the one that embeds the list) and property name.

It also guess default filter (relation between the parent and embedded list) for most of cases.

Edit view

Use pre-configured type embedded_list in the form definition :

But in many cases, the EmbeddedListHelper guesses __type_options__ for you, and you just have to write :

Let's see the result !

Show view

Using guesser for classic *ToMany relations :

Use following __template_options__ to pass options.

Disabling "Open in new tab" link at the bottom of embedded lists

Autocomplete add new option 'create' for modal in new and edit

Configure form type 'easyadmin_autocomplete', add type_options: { attr: { create: true } }

Define access permissions

Global minimum role access

You can define a minimum role to access the EasyAdmin controller (any action handled by the controller) :

This is just a global restriction, that should live with a security firewall as described in Symfony documentation.

Per entity action role permissions

You can also define role permissions per entity action :

Above configuration define a required role per action for Product entity. This is too verbose, isn't it ? Let's sum up as following :

Entity _roleprefix defines all actions required roles by appending the action name to the prefix.

Per entity field role permissions in form

You can also define role permissions per entity field in a form:

If user do not hold the required role, the form field will be disabled.

Confirmation modal for custom POST actions without form

A generic confirmation modal asks for confirmation (or any custom message) for links with data-confirm attribute (that may contain the custom message) and URL in data-href attribute.

Easy configurable with custom list actions by adding a confirm key :

To keep the confirmation modal behavior while creating a custom action template you need to use the action template provided by this bundle, replacing {{ include('@EasyAdmin/default/action.html.twig') }} by {{ include('@EasyAdminExtension/default/action.html.twig') }}.

Exclude fields in forms

In such entity:

It will show all fields but those mentioned in exclude_fields, equivalent to the following configuration:

Use template show vertical boostrap

Design EasyAdmin configuration:

Run tests

Run following command :

OR using Docker and Docker Compose :

Run code quality tools

PHP CS Fixer

Locally with Docker :

docker-compose run --rm php /app/vendor/bin/php-cs-fixer fix --config=/app/.php_cs /app/src

PHPStan

Locally with Docker :

docker-compose run --rm php /app/vendor/bin/phpstan analyse -c /app/phpstan.neon --level=5 /app/src

License

This software is published under the MIT License


All versions of easyadmin-extension-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
doctrine/collections Version ^1.5
doctrine/common Version ^2.11|^3.0
doctrine/dbal Version ^2.10|^3.0
doctrine/doctrine-bundle Version ^1.8|^2.0
doctrine/orm Version ^2.7
doctrine/persistence Version ^1.3|^2
easycorp/easyadmin-bundle Version ^2.3.4
symfony/config Version ^5.3|^6.0
symfony/dependency-injection Version ^5.3|^6.0
symfony/event-dispatcher Version ^5.3|^6.0
symfony/form Version ^5.3|^6.0
symfony/framework-bundle Version ^5.3|^6.0
symfony/http-foundation Version ^5.3|^6.0.7
symfony/http-kernel Version ^5.3|^6.0
symfony/property-access Version ^5.3|^6.0
symfony/validator Version ^5.3|^6.0
twig/twig Version ^3.3.8
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 alterphp/easyadmin-extension-bundle contains the following files

Loading the files please wait ....