Download the PHP package wieni/wmentity_overview without Composer

On this page you can find all versions of the php package wieni/wmentity_overview. 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 wmentity_overview

Entity Overview

Latest Stable Version Total Downloads License

Improved EntityListBuilders with support for paging, table sorting, table dragging, filtering, bulk actions, database queries and more.

Why?

At Wieni, we're not a big fan of the Views module and for a couple of reasons:

That's why a couple of years ago we decided to disable the module altogether and we ended up with the EntityListBuilder based listings.

Those proved to be lacking in functionality and user friendliness soon enough, which is how we ended up creating this module: the perfect middle ground between Views and EntityListBuilder. It offers all features of the latter, plus the following:

Installation

This package requires PHP 7.1 and Drupal 8 or higher. It can be installed using Composer:

How does it work?

Create an overview

Overviews are Drupal plugins with the @OverviewBuilder annotation. Every annotation needs at least the entity_type and id parameters to function.

There are three base classes you can choose from:

Example

Override en existing entity listing

You can override the default entity listing with a custom overview by adding the override parameter to the annotation. In case the entity type is not recognised by this module, you can add the route_name and pass the route name of the entity listing instead.

It is also possible to override the entity listing only when a certain combination of filters is active. This way, you could for example add extra filters or table columns when your overview is filtered by a certain bundle.

Examples

Render an overview

When you create an overview without overriding an existing route, you will have to render it somewhere manually.

Creating an instance of an entity overview is done the same way as other Drupal plugins, by using the createInstance method of OverviewBuilderManager.

Another option is adding _entity_overview to the defaults section of your route definition, with as value the plugin id.

Example

Filter storages

Entity overviews with exposed filter forms need a place to (temporarily) store their filter values. That's where filter storages come to play: an abstraction in the way these values are stored.

By default, two storage methods are included: query, which stores values as query parameters in the URL and session, which stores values in the session storage.

Custom storage methods can be added by creating a Drupal plugin with the @FilterStorage annotation and an id parameter, implementing FilterStorageInterface and optionally extending FilterStorageBase.

The default storage method is query, but this can be changed by adding a filter_storage parameter to @OverviewBuilder annotations.

Add bulk actions

Bulk actions can be added to your overview by implementing BulkActionOverviewBuilderInterface and the getBulkActionPlugins method. This method can return two kinds of arrays:

In the last case the default plugin labels will be used.

It is possible to attach a configuration form to your action plugin by implementing PluginFormInterface. In case you need access to the entities in your form validate and/or submit handlers, you can implement ActionPluginFormInterface instead. Note that in contrary to PluginFormInterface this is a custom interface, only supported by this module.

Hooks and events

hook_entity_overview_alter

This hook is only called when using overrides or when using the _entity_overview default in routes. An event equivalent to the hook is also provided: WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTER

Examples

hook_entity_overview_alternatives_alter

This hook is only called in the OverviewBuilderManager::getAlternatives method. An event equivalent to the hook is also provided: WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTERNATIVES_ALTER

Example

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

Distributed under the MIT License. See the LICENSE file for more information.


All versions of wmentity_overview with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
drupal/core Version ^10.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 wieni/wmentity_overview contains the following files

Loading the files please wait ....