This commit is contained in:
Simon Vieille 2015-03-05 19:59:03 +01:00
parent 6c46a807f9
commit 7287652be9
14 changed files with 40 additions and 56 deletions

View file

@ -220,7 +220,6 @@ class ".$classNameConfiguration." extends \\Trinity\\Bundle\\AdminBundle\\Config
->setEditTitle('Edition of \"%id%\"')
// Listing:
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
// ->setDisplayFields(array(
//

View file

@ -400,7 +400,7 @@ class BaseAdminController extends Controller
return 1;
//}
return 0;
//return 0;
}
protected function batchAction(Request $request)

View file

@ -18,9 +18,9 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
// $treeBuilder->root('trinity_admin');
/* $treeBuilder->root('trinity_admin');
/*$rootNode
$rootNode
->children()
->arrayNode('i18n')
->info('I18n configuration')

View file

@ -6,7 +6,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Trinity\Bundle\AdminMenuBundle\Menu\MenuFactory;
use Trinity\Bundle\AdminMenuBundle\Menu\ListRenderer;
#use Knp\Menu\Renderer\ListRenderer;
use Trinity\Bundle\AdminMenuBundle\Menu\ConfigurationTransformer;
use Trinity\Bundle\ContentManagerBundle\Model\NavQuery;
use Knp\Menu\Matcher\Matcher;

View file

@ -34,11 +34,6 @@ class BlockManager
continue;
}
//TODO: voir si il faut faire une interface pour les blocs éditoriaux
/*if ($block->getValue() == NULL) {
continue;
}*/
if ($block) {
return $block;
}

View file

@ -138,7 +138,6 @@ class NavigationAdminController extends BaseAdminController
// foreach ($node->getPage()->getBlocks() as $block) {
// $blockCopy = $block->copy(true);
// $blockCopy
// ->setPageId($pageCopy->getId())
// ->save();

View file

@ -27,8 +27,8 @@ class MenuType extends AbstractType
'class' => 'Trinity\Bundle\ContentManagerBundle\Model\Nav',
)
);
// $builder->add('updatedAt');
// $builder->add('createdAt');
// $builder->add('updatedAt');
// $builder->add('createdAt');
}
/**

View file

@ -261,7 +261,7 @@ class Node extends BaseNode
}
if ($this->getPage() && $this->getPage()->getNodeId() != $this->getId()) {
//$this->getPage()->setNodeId($this->getId())->save();
// $this->getPage()->setNodeId($this->getId())->save();
}
return parent::save($con);

View file

@ -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 instanceof NodeRoute) {

View file

@ -26,9 +26,6 @@ class BlockExtension extends \Twig_Extension
public function initRuntime(\Twig_Environment $environment)
{
$this->environment = $environment;
// $this->code_render = clone $this->environment;
// $this->code_render->setLoader(new \Twig_Loader_String());
}
public function getName()
@ -75,13 +72,12 @@ class BlockExtension extends \Twig_Extension
public function renderCodeBlock($block_name, $options)
{
// try {
// $block = $this->blockManager->retrieve($block_name);
// } catch (BlockNotFoundException $e) {
// return null;
// }
//
// return $this->code_render->render($block->getValue(), $options);
// try {
// $block = $this->blockManager->retrieve($block_name);
// } catch (BlockNotFoundException $e) {
// return null;
// }
// return $this->code_render->render($block->getValue(), $options);
}
public function render($template, array $parameters = array())

View file

@ -53,7 +53,6 @@ class TemplateCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuratio
)
// Listing:
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
// ->setDisplayFields(array(
//

View file

@ -12,25 +12,25 @@ class PersoType extends AbstractType
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
/*$resolver
->setDefaults(array(
'show_size' => false,
))
->setRequired(array(
'path',
))
->setOptional(array(
'ajax_data',
))
->setAllowedTypes(array(
'help' => 'string',
'theme' => 'Acme\AjaxBundle\ThemeInterface',
'ajax_data' => array('null', 'scalar'),
))
->setAllowedValues(array(
'mode' => array('compact', 'wide'),
))
;*/
// $resolver
// ->setDefaults(array(
// 'show_size' => false,
// ))
// ->setRequired(array(
// 'path',
// ))
// ->setOptional(array(
// 'ajax_data',
// ))
// ->setAllowedTypes(array(
// 'help' => 'string',
// 'theme' => 'Acme\AjaxBundle\ThemeInterface',
// 'ajax_data' => array('null', 'scalar'),
// ))
// ->setAllowedValues(array(
// 'mode' => array('compact', 'wide'),
// ))
// ;
}
/**

View file

@ -53,8 +53,6 @@ class SessionStorage extends Storage
}
if ($this->options['auto_start'] && !self::$sessionStarted) {
// TODO: must look better…
//@session_start();
self::$sessionStarted = true;
}
}
@ -67,9 +65,9 @@ class SessionStorage extends Storage
$retval = $_SESSION[$key];
}
if(is_string($retval)) {
$retval = (false !== $uns = @unserialize($retval)) ? $uns : $retval;
}
if (is_string($retval)) {
$retval = (false !== $uns = @unserialize($retval)) ? $uns : $retval;
}
return $retval;
}
@ -88,11 +86,10 @@ class SessionStorage extends Storage
public function write($key, $data)
{
if(is_object($data) || is_array($data)) {
$data = serialize($data);
}
if (is_object($data) || is_array($data)) {
$data = serialize($data);
}
$_SESSION[$key] = $data;
}
}

View file

@ -137,9 +137,9 @@ class Image
$output = $this->image;
}
//$this->getTool()->setCompressionQuality($this->getCompressionQuality());
/**
* $this->getTool()->setCompressionQuality($this->getCompressionQuality());
*
* Should be $this->getTool()->writetImage($output);
* but it does not work (Undefined Method)
* Bug #61879