Download the PHP package comur/content-admin-bundle without Composer

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

Introduction

This bundles helps you to add a field in your backend and edit all template contents dynamically thanks to CKEditor inline editing

It lets you edit also images by using ComurImageBundle

If this bundle helps you reduce time to develop, you can pay me a cup of coffee ;)

coffee

Installation

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

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

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

Configuration

You can configure following parameters by creating a comur_content_admin.yaml in your config directory:

Ex: screenshot of multilingual admin

Fullscreen mode:

You can even edit a button label:

Editable images

Edit images with ComurImageBundle

Select from your library (already uploaded images)

Upload image

Crop on the go with HTML attribute defined sizes (crop / resize)

Usage

Step 1: Add twig form template

NOT NEEDED ANYMORE, template is added automatically now !

Add form field template to your twig configuration (config/twig.yaml):

Step 2: Include routes

Include routes in your routes.yaml (config/routes.yaml):

Step 3: Implement abstract entity

ComurContentAdminBundle uses an property (orm column) to save dynamic content data in database using your related entity. To do so, you need to extend AbstractInlineContent class. This class will add a property called content in your entity (so be careful to not use this column in your entity !).

Step 4: Use it in your admin (ex for sonata admin but can be used in custom admins too)

Step 5: Post size limit

Be careful to your data size limit sent in POST request. You may have to change it to be able to get all from data (all dynamic content values).

For more info check https://www.php.net/manual/en/ini.core.php#ini.post-max-size

Do not forget to check your server's limit too (Nginx, Apache...)

Step 6: Add twig filter into the template

This bundle adds a new twig filter called "inlinecontent". You must use it for the bundle to determine and replace contents using data-content-id attribute on html tags needing content replacement.

Ex:

Step 7: Pass content to your template from your controller

Content is managed by this bundle but you need to pass your content data to template for the bundle to have it and replace content accordingly.

Ex:

Using ComurImageBundle to edit images

Step 1: Install Comur Image Bundle

Please follow instructions on ComurImageBundle to install it

Step 2: Activate comur_image_compatibility in config

:warning: NOT NEEDED ANYMORE, bundle checks if ComurImageBundle is installed or not and activates automatically if it finds it

Step 3: Add data attributes on images of your template

Ex:

This code will automatically replaced by twig filter and src will be automatically filled by database value

This limits usage to img tags (and cannot be used for background images) so if someone has an idea to edit background images, let me know ;)

Step 4: Use it in your form

Please refer to ComurImageBundle documentation for complete list of parameters

Development

Any help in improving this bundle is kindly appreciated ! Please do not hesitate to send PR !

TODO

Troubleshooting

Content didn't replaced

One reason for that is if you put some extra spaces in your html tags. DomDocument fixes html and removes extra spaces or other things that it founds not respectful of HTML rules. Ex:


All versions of content-admin-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
symfony/console Version >=3.4
symfony/form Version >=3.4
symfony/framework-bundle Version >=3.4
symfony/orm-pack Version *
symfony/translation Version >=3.4
symfony/twig-bundle Version >=3.4
symfony/validator Version >=3.4
symfony/yaml Version >=3.4
emanueleminotto/simple-html-dom Version *
ext-json Version *
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 comur/content-admin-bundle contains the following files

Loading the files please wait ....