Download the PHP package bukashk0zzz/liip-imagine-serialization-bundle without Composer

On this page you can find all versions of the php package bukashk0zzz/liip-imagine-serialization-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 liip-imagine-serialization-bundle

Symfony LiipImagineSerialization Bundle

Build Status Code Coverage Scrutinizer Code Quality License Latest Stable Version Total Downloads

SensioLabsInsight

About

Provides integration between LiipImagineBundle and JMSSerializerBundle. Allows to generate full or relative URIs to entity fields mapped with @Bukashk0zzz and @JMS annotations during the serialization. Also bundle supports VichUploaderBundle field type.

Installation Symfony Flex

Installation without Symfony Flex

Add the bundle to app/AppKernel.php

Configuration

Add this to your config.yml:

Usage

Add the next class to the use section of your entity class.

Bundle provides two annotations which allow the serialization of url or @Vich\UploadableField fields in your entities. At first you have to add @Bukashk0zzz\LiipImagineSerializableClass to the entity class which has image fields. Then you have to add @Bukashk0zzz\LiipImagineSerializableField annotation to the field you want to serialize.

Annotation @Bukashk0zzz\LiipImagineSerializableClass does not have any option.
Annotation @Bukashk0zzz\LiipImagineSerializableField has one required option filter which value should link to the LiipImagine filter.

It can be set like this @Bukashk0zzz\LiipImagineSerializableField("photoFile") or @Bukashk0zzz\LiipImagineSerializableField(filter="photoFile"). filter can be array of filters in this case serialized field will be also array. For example if you add annotation @Bukashk0zzz\LiipImagineSerializableField(filter={"big", "small"}) for field image then you get:

Also there is another two options:

Don't forget that to serialize image fields they also should be marked with @JMS annotations to be serialized.

The generated URI by default:

The generated URI with includeHost set to false:

If you need to change url before passing it to LiipImagine, for example you need to swap origin name, you can use originUrlNormalizer option in bundle config.

If you need to change url after LiipImagine processing, for example you need to swap origin domain, you can use filteredUrlNormalizer option in bundle config.

UrlNormalizer class must implement UrlNormalizerInterface

Events

There are two events:

Example subscriber:

Example

Copyright / License

See LICENSE


All versions of liip-imagine-serialization-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
symfony/dependency-injection Version ^4.0|^5.0
symfony/yaml Version ^4.0|^5.0
doctrine/orm Version ^2.5
jms/serializer-bundle Version ^3.0|^4.0
liip/imagine-bundle Version ^1.8|^2.3
vich/uploader-bundle Version ^1.5
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 bukashk0zzz/liip-imagine-serialization-bundle contains the following files

Loading the files please wait ....