studio1/batch-operation

This bundle extends Pimcore core functionality by adding buttons in asset list view, e.g. to add / replace tags or move selected assets.

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 112

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:pimcore-bundle

v2.0.1 2024-08-21 05:10 UTC

README

This bundle extends Pimcore core functionality by adding buttons in asset list view, e.g. to add / replace tags or move selected assets.

🛠️ Installation

  1. Download the bundle using composer:
    composer require studio1/batch-operation
  2. Enable the bundle by adding it to config/bundles.php:
    <?php
    // ...
    use Studio1\BatchOperationBundle\BatchOperationBundle;
    
    
    return [
       # Pimcore Bundles
       // ...
       # Studio1 Bundles
        BatchOperationBundle::class => ['all' => true],
        // ...
    ];

📦 Dependencies

This Bundle requires a Pimcore installation and is not stand-alone.

Please see require section of composer.json for dependency details.

THIS PACKAGE NEEDS CHANGES IN PIMCORE-CORE FILES. THOSE ARE APPLIED USING AN INCLUDED PATCH FILE.

🧩 Add buttons to asset list view

Default behaviour

By default, the bundle adds two buttons to the asset list view (even if no configuration in yaml file is done):

  • Add Tags - opens a modal to add tags to selected assets
  • Move - opens a modal to move selected assets to another location

Asset List

Tag Selection

Move

Example configuration

If other (or less) buttons are needed, you need update the configuration in your project accordingly.

batch_operation:
    additional_asset_list_buttons:
        - getS1BatchOperationAssetButtonForTag
        - getS1BatchOperationAssetButtonForMove

How to add additional buttons to asset list view

  1. Add new entry to yaml configuration of your project.
  2. Add new JS file containing the button logic to your project, see files in the following directory as example src/Resources/public/js/pimcore/button-function/asset/.
  3. Ensure new JS file is loaded properly in your project. E.g. by adding it to getJsPaths() method of your project.

🗑️ Uninstall

  1. Remove the bundle from config/bundles.php (see Installation):
  2. Remove the bundle from composer.json:
    composer remove studio1/batch-operation