Download the PHP package unifik/media-bundle without Composer

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

UnifikMediaBundle

Installation

Using composer file :

"require": {
    //...,
    "unifik/media-bundle": "dev-master"
},

Add the following line to AppKernel.php :

new Unifik\MediaBundle\UnifikMediaBundle(),

In app/config/routing.yml add the following:

unifik_media_backend:
    resource: "@UnifikMediaBundle/Resources/config/routing_backend.yml"
    prefix:   /admin/media

To activate the media manager with CKEditor once the bundle is loaded, you must register the plugin in the ckeditor config (app/config/config.yml):

external_plugins:
    unifikmediamanager:
        path: bundles/unifikmedia/backend/js/ckeditor/plugin/unifikmediamanager

You must also add the 'Insert_media' button in one toolbar. An example of config:

trsteel_ckeditor:
  toolbar_groups:
      [...]
      insert: ['Insert_media', 'Image', 'Flash', 'Table', 'HorizontalRule']
      [...]

To get the proper media select field in your form, your need to add those lines in your form theme:

{% block media_select_widget %}
    {% include 'UnifikMediaBundle:Backend/Form:fields.html.twig' with {'widget_attributes': block('widget_attributes')} %}
{% endblock %}

This bundle use FOSRoutingBundle. So you need to include the following js files:

{% javascripts
    'bundles/fosjsrouting/js/router.js'
    'js/fos_js_routes.js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}

And run this command: app/console fos:js-routing:dump

Include the dynamic_loader.js file required to add the Media Bundle CKEditor Plugin:

{% javascripts
    '@UnifikMediaBundle/Resources/public/backend/js/dynamic_loader.js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}

Include the liip imagine routing in your config.yml file:

_liip_imagine:
    resource: "@LiipImagineBundle/Resources/config/routing.xml"

Bundle requirements

Add Media field

To link media with entity, add the manyToOne relation as follow:

manyToOne:
  myMedia:
    targetEntity: Unifik\MediaBundle\Entity\Media

To generate de media field, add this in your form type: (default type is image)

->add('image2', 'media_select')

To choose an other media type: (available types are: image, video, embedvideo and document)

->add('image2', 'media_select', array('type' => 'image'))

All versions of media-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/symfony Version ~2.3
unifik/doctrine-behaviors-bundle Version dev-master
liip/imagine-bundle Version ~1.0
friendsofsymfony/jsrouting-bundle Version dev-master
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 unifik/media-bundle contains the following files

Loading the files please wait ....