Download the PHP package webfactory/visibility-filter-bundle without Composer

On this page you can find all versions of the php package webfactory/visibility-filter-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 visibility-filter-bundle

VisibilityFilterBundle – A centralised approach to visibility of Doctrine Entities

This bundle provides a Doctrine Filter which handles visibility filtering for Entities transparently for a whole application, removing the need to repeatedly phrase the filtering in every repository method of an Entity. Most notably, the filtering also applies to Doctrine queries that bypass the repository, like relationships declared in the entity mapping.

Getting started

First, you need to declare this bundle as a composer dependency.

Next, the bundle needs to be registered to Symfony. Depending on your Symfony version, this might look like that:

The filter class needs to be registered manually.

Important: The YAML key of the filter needs to visibility, otherwise the filter won't be activated on requests.

Configuring the visibility column

This bundle assumes that the visibility determination is going to be based on a specific field in the Entity containing visibility information; e.g. functioning as a "visibility switch" containing "yes" or "no" or containing a visibility grade on a scale, based on which the visibility of the object will be determined.

Currently, only entities that have a visibility column configured will be filtered at all.

All you need to configure on your entity is which of its fields will be the one with the visibility information. You can do that by Adding the VisibilityColumn() annotation to that field.

Please note that configuring more than one field as visibility column will throw an exception.

Replacing the filter strategy

By default, the library makes you application only query entities from the database that have the string y in their visibility column. You can change this behaviour by overwriting the service Webfactory\VisibilityFilterBundle\Filter\FilterStrategy with your own implementation.

Your implementation needs to implement the FilterStrategy interface. If you only want to change the y string to something different, you can use the Webfactory\VisibilityFilterBundle\Filter\Strategy\ValueInField implementation and provide it with a different visibleValue in its constructor.


All versions of visibility-filter-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.1
doctrine/annotations Version ^1.12
doctrine/doctrine-bundle Version ^1.12.13|^2.0
doctrine/orm Version ^2.7.2
symfony/config Version ^5.4|^6.4
symfony/dependency-injection Version ^5.4|^6.4
symfony/event-dispatcher Version ^5.4|^6.4
symfony/http-kernel Version ^5.4|^6.4
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 webfactory/visibility-filter-bundle contains the following files

Loading the files please wait ....