mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 11:03:17 +00:00

* add command feedback:report ; bump back to 4.1.8-rc9 WIP OK TO TEST * aadd dry, log, ... ; move conf ; bump back to 4.1.8-rc8 WIP OK TO TEST * add command feedback:report ; bump back to 4.1.8-rc9 WIP OK TO TEST * aadd dry, log, ... ; move conf ; bump back to 4.1.8-rc8 WIP OK TO TEST * add default (disabled) conf in conf.d * Update Version.php bump version made in #4426
30 lines
554 B
PHP
30 lines
554 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\Command\Feedback\Report;
|
|
|
|
use Twig_Environment;
|
|
use Twig_Template;
|
|
|
|
class Action
|
|
{
|
|
/** @var Twig_Template[] */
|
|
private $template = null;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $action_conf;
|
|
|
|
public function __construct(Twig_Environment $twig, array $action_conf)
|
|
{
|
|
$this->action_conf = $action_conf;
|
|
$this->template = $twig->createTemplate($action_conf['value']);
|
|
}
|
|
|
|
public function getValue(array $context)
|
|
{
|
|
return $this->template->render($context);
|
|
}
|
|
|
|
}
|