mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
updated existing plugin interfaces, added basket actionbar plugin interface
This commit is contained in:

committed by
Benoît Burnichon

parent
41d9c18c04
commit
831436f6fe
@@ -43,6 +43,9 @@ class PluginServiceProvider implements ServiceProviderInterface
|
||||
$app['plugins.manager'] = $app->share(function (Application $app) {
|
||||
return new PluginManager($app['plugin.path'], $app['plugins.plugins-validator'], $app['conf']);
|
||||
});
|
||||
$app['plugin.workzone.basket.actionbar'] = $app->share(function () {
|
||||
return new Pimple();
|
||||
});
|
||||
$app['plugin.actionbar'] = $app->share(function () {
|
||||
return new Pimple();
|
||||
});
|
||||
@@ -50,7 +53,7 @@ class PluginServiceProvider implements ServiceProviderInterface
|
||||
return new Pimple();
|
||||
});
|
||||
|
||||
$app['plugin.locale.textdomains'] = new ArrayObject();
|
||||
$app['plugin.locale.textdomains'] = new \ArrayObject();
|
||||
|
||||
// Routes will be bound after all others
|
||||
// Add a new controller provider can be added as follows
|
||||
@@ -60,7 +63,7 @@ class PluginServiceProvider implements ServiceProviderInterface
|
||||
// Routes will be bound after all others
|
||||
// Add a new controller provider can be added as follows
|
||||
// $app['plugin.controller_providers'][] = array('/prefix', 'controller_provider_service_key');
|
||||
$app['plugin.controller_providers.api'] = new ArrayObject();
|
||||
$app['plugin.controller_providers.api'] = new \ArrayObject();
|
||||
}
|
||||
|
||||
public function boot(Application $app)
|
||||
|
@@ -32,10 +32,10 @@ interface ActionBarPluginInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginName();
|
||||
public function getPluginLocale();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginLocale();
|
||||
public function getPluginName();
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2015 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Plugin;
|
||||
|
||||
|
||||
interface BasketActionBarPluginInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getBasketActionBar();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginLocale();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginName();
|
||||
}
|
@@ -12,4 +12,14 @@ namespace Alchemy\Phrasea\Plugin;
|
||||
|
||||
interface WorkZonePluginInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginLocale();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginName();
|
||||
}
|
@@ -58,6 +58,19 @@
|
||||
<img src="/skins/icons/delete.png"/>
|
||||
</button>
|
||||
|
||||
{% if app['plugin.workzone.basket.actionbar'].keys() is not empty %}
|
||||
{% for pluginId in app['plugin.workzone.basket.actionbar'].keys() %}
|
||||
{% for key,action in app['plugin.workzone.basket.actionbar'][pluginId].getBasketActionBar() %}
|
||||
{% set label = action.label %}
|
||||
|
||||
<button class="ui-corner-all basket_window {{ action.classes|default('') }}" title="{% trans label app['plugin.workzone.basket.actionbar'][pluginId].PluginLocale %}">
|
||||
<img src="{{ plugin_asset(app['plugin.workzone.basket.actionbar'][pluginId].PluginName,action.icon) }}"/>
|
||||
</button>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="alert_datas_changed ui-corner-all">{{ 'Certaines donnees du panier ont change' | trans }} <a class="basket_refresher" href="#">{{ 'rafraichir' | trans }}</a></div>
|
||||
{% if basket_length == 0 %}
|
||||
|
Reference in New Issue
Block a user