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%\"')
|
||||
|
||||
// Listing:
|
||||
|
||||
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
||||
// ->setDisplayFields(array(
|
||||
//
|
||||
|
|
|
@ -400,7 +400,7 @@ class BaseAdminController extends Controller
|
|||
|
||||
return 1;
|
||||
//}
|
||||
return 0;
|
||||
//return 0;
|
||||
}
|
||||
|
||||
protected function batchAction(Request $request)
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,6 @@ class NavigationAdminController extends BaseAdminController
|
|||
|
||||
// foreach ($node->getPage()->getBlocks() as $block) {
|
||||
// $blockCopy = $block->copy(true);
|
||||
|
||||
// $blockCopy
|
||||
// ->setPageId($pageCopy->getId())
|
||||
// ->save();
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -53,7 +53,6 @@ class TemplateCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuratio
|
|||
)
|
||||
|
||||
// Listing:
|
||||
|
||||
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
||||
// ->setDisplayFields(array(
|
||||
//
|
||||
|
|
|
@ -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'),
|
||||
// ))
|
||||
// ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue