psr
This commit is contained in:
parent
6c46a807f9
commit
7287652be9
|
@ -220,7 +220,6 @@ class ".$classNameConfiguration." extends \\Trinity\\Bundle\\AdminBundle\\Config
|
||||||
->setEditTitle('Edition of \"%id%\"')
|
->setEditTitle('Edition of \"%id%\"')
|
||||||
|
|
||||||
// Listing:
|
// Listing:
|
||||||
|
|
||||||
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
||||||
// ->setDisplayFields(array(
|
// ->setDisplayFields(array(
|
||||||
//
|
//
|
||||||
|
|
|
@ -400,7 +400,7 @@ class BaseAdminController extends Controller
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
//}
|
//}
|
||||||
return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function batchAction(Request $request)
|
protected function batchAction(Request $request)
|
||||||
|
|
|
@ -18,9 +18,9 @@ class Configuration implements ConfigurationInterface
|
||||||
public function getConfigTreeBuilder()
|
public function getConfigTreeBuilder()
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder();
|
$treeBuilder = new TreeBuilder();
|
||||||
// $treeBuilder->root('trinity_admin');
|
/* $treeBuilder->root('trinity_admin');
|
||||||
|
|
||||||
/*$rootNode
|
$rootNode
|
||||||
->children()
|
->children()
|
||||||
->arrayNode('i18n')
|
->arrayNode('i18n')
|
||||||
->info('I18n configuration')
|
->info('I18n configuration')
|
||||||
|
|
|
@ -6,7 +6,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||||
use Trinity\Bundle\AdminMenuBundle\Menu\MenuFactory;
|
use Trinity\Bundle\AdminMenuBundle\Menu\MenuFactory;
|
||||||
use Trinity\Bundle\AdminMenuBundle\Menu\ListRenderer;
|
use Trinity\Bundle\AdminMenuBundle\Menu\ListRenderer;
|
||||||
#use Knp\Menu\Renderer\ListRenderer;
|
|
||||||
use Trinity\Bundle\AdminMenuBundle\Menu\ConfigurationTransformer;
|
use Trinity\Bundle\AdminMenuBundle\Menu\ConfigurationTransformer;
|
||||||
use Trinity\Bundle\ContentManagerBundle\Model\NavQuery;
|
use Trinity\Bundle\ContentManagerBundle\Model\NavQuery;
|
||||||
use Knp\Menu\Matcher\Matcher;
|
use Knp\Menu\Matcher\Matcher;
|
||||||
|
|
|
@ -34,11 +34,6 @@ class BlockManager
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: voir si il faut faire une interface pour les blocs éditoriaux
|
|
||||||
/*if ($block->getValue() == NULL) {
|
|
||||||
continue;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if ($block) {
|
if ($block) {
|
||||||
return $block;
|
return $block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,6 @@ class NavigationAdminController extends BaseAdminController
|
||||||
|
|
||||||
// foreach ($node->getPage()->getBlocks() as $block) {
|
// foreach ($node->getPage()->getBlocks() as $block) {
|
||||||
// $blockCopy = $block->copy(true);
|
// $blockCopy = $block->copy(true);
|
||||||
|
|
||||||
// $blockCopy
|
// $blockCopy
|
||||||
// ->setPageId($pageCopy->getId())
|
// ->setPageId($pageCopy->getId())
|
||||||
// ->save();
|
// ->save();
|
||||||
|
|
|
@ -27,8 +27,8 @@ class MenuType extends AbstractType
|
||||||
'class' => 'Trinity\Bundle\ContentManagerBundle\Model\Nav',
|
'class' => 'Trinity\Bundle\ContentManagerBundle\Model\Nav',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// $builder->add('updatedAt');
|
// $builder->add('updatedAt');
|
||||||
// $builder->add('createdAt');
|
// $builder->add('createdAt');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -261,7 +261,7 @@ class Node extends BaseNode
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getPage() && $this->getPage()->getNodeId() != $this->getId()) {
|
if ($this->getPage() && $this->getPage()->getNodeId() != $this->getId()) {
|
||||||
//$this->getPage()->setNodeId($this->getId())->save();
|
// $this->getPage()->setNodeId($this->getId())->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::save($con);
|
return parent::save($con);
|
||||||
|
|
|
@ -84,7 +84,7 @@ class NodeLoader extends Loader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// $node->setUrl( $route->getPath() )->save();
|
// $node->setUrl( $route->getPath() )->save();
|
||||||
|
|
||||||
if ($exist = $routes->get($routeName)) {
|
if ($exist = $routes->get($routeName)) {
|
||||||
if ($exist instanceof NodeRoute) {
|
if ($exist instanceof NodeRoute) {
|
||||||
|
|
|
@ -26,9 +26,6 @@ class BlockExtension extends \Twig_Extension
|
||||||
public function initRuntime(\Twig_Environment $environment)
|
public function initRuntime(\Twig_Environment $environment)
|
||||||
{
|
{
|
||||||
$this->environment = $environment;
|
$this->environment = $environment;
|
||||||
|
|
||||||
// $this->code_render = clone $this->environment;
|
|
||||||
// $this->code_render->setLoader(new \Twig_Loader_String());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName()
|
||||||
|
@ -75,13 +72,12 @@ class BlockExtension extends \Twig_Extension
|
||||||
|
|
||||||
public function renderCodeBlock($block_name, $options)
|
public function renderCodeBlock($block_name, $options)
|
||||||
{
|
{
|
||||||
// try {
|
// try {
|
||||||
// $block = $this->blockManager->retrieve($block_name);
|
// $block = $this->blockManager->retrieve($block_name);
|
||||||
// } catch (BlockNotFoundException $e) {
|
// } catch (BlockNotFoundException $e) {
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
//
|
// return $this->code_render->render($block->getValue(), $options);
|
||||||
// return $this->code_render->render($block->getValue(), $options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render($template, array $parameters = array())
|
public function render($template, array $parameters = array())
|
||||||
|
|
|
@ -53,7 +53,6 @@ class TemplateCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuratio
|
||||||
)
|
)
|
||||||
|
|
||||||
// Listing:
|
// Listing:
|
||||||
|
|
||||||
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
||||||
// ->setDisplayFields(array(
|
// ->setDisplayFields(array(
|
||||||
//
|
//
|
||||||
|
|
|
@ -12,25 +12,25 @@ class PersoType extends AbstractType
|
||||||
*/
|
*/
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
{
|
{
|
||||||
/*$resolver
|
// $resolver
|
||||||
->setDefaults(array(
|
// ->setDefaults(array(
|
||||||
'show_size' => false,
|
// 'show_size' => false,
|
||||||
))
|
// ))
|
||||||
->setRequired(array(
|
// ->setRequired(array(
|
||||||
'path',
|
// 'path',
|
||||||
))
|
// ))
|
||||||
->setOptional(array(
|
// ->setOptional(array(
|
||||||
'ajax_data',
|
// 'ajax_data',
|
||||||
))
|
// ))
|
||||||
->setAllowedTypes(array(
|
// ->setAllowedTypes(array(
|
||||||
'help' => 'string',
|
// 'help' => 'string',
|
||||||
'theme' => 'Acme\AjaxBundle\ThemeInterface',
|
// 'theme' => 'Acme\AjaxBundle\ThemeInterface',
|
||||||
'ajax_data' => array('null', 'scalar'),
|
// 'ajax_data' => array('null', 'scalar'),
|
||||||
))
|
// ))
|
||||||
->setAllowedValues(array(
|
// ->setAllowedValues(array(
|
||||||
'mode' => array('compact', 'wide'),
|
// 'mode' => array('compact', 'wide'),
|
||||||
))
|
// ))
|
||||||
;*/
|
// ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,8 +53,6 @@ class SessionStorage extends Storage
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->options['auto_start'] && !self::$sessionStarted) {
|
if ($this->options['auto_start'] && !self::$sessionStarted) {
|
||||||
// TODO: must look better…
|
|
||||||
//@session_start();
|
|
||||||
self::$sessionStarted = true;
|
self::$sessionStarted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,9 +65,9 @@ class SessionStorage extends Storage
|
||||||
$retval = $_SESSION[$key];
|
$retval = $_SESSION[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_string($retval)) {
|
if (is_string($retval)) {
|
||||||
$retval = (false !== $uns = @unserialize($retval)) ? $uns : $retval;
|
$retval = (false !== $uns = @unserialize($retval)) ? $uns : $retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $retval;
|
return $retval;
|
||||||
}
|
}
|
||||||
|
@ -88,10 +86,9 @@ class SessionStorage extends Storage
|
||||||
|
|
||||||
public function write($key, $data)
|
public function write($key, $data)
|
||||||
{
|
{
|
||||||
if(is_object($data) || is_array($data)) {
|
if (is_object($data) || is_array($data)) {
|
||||||
$data = serialize($data);
|
$data = serialize($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$_SESSION[$key] = $data;
|
$_SESSION[$key] = $data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,9 +137,9 @@ class Image
|
||||||
$output = $this->image;
|
$output = $this->image;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$this->getTool()->setCompressionQuality($this->getCompressionQuality());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* $this->getTool()->setCompressionQuality($this->getCompressionQuality());
|
||||||
|
*
|
||||||
* Should be $this->getTool()->writetImage($output);
|
* Should be $this->getTool()->writetImage($output);
|
||||||
* but it does not work (Undefined Method)
|
* but it does not work (Undefined Method)
|
||||||
* Bug #61879
|
* Bug #61879
|
||||||
|
|
Loading…
Reference in a new issue