insight recommandations
This commit is contained in:
parent
ba64c7e209
commit
cbdc3109e3
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
namespace Trinity\Bundle\AdminBreadcrumbsBundle\Model;
|
namespace Trinity\Bundle\AdminBreadcrumbsBundle\Model;
|
||||||
|
|
||||||
use \Symfony\Component\Routing\RouterInterface;
|
use Symfony\Component\Routing\RouterInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class BreadcrumbManager
|
class BreadcrumbManager
|
||||||
{
|
{
|
||||||
|
@ -54,7 +55,7 @@ class BreadcrumbManager
|
||||||
return $this->root_item;
|
return $this->root_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildCrudBreadcrumbFor($request)
|
public function buildCrudBreadcrumbFor(Request $request)
|
||||||
{
|
{
|
||||||
$routename = $request->get('_route');
|
$routename = $request->get('_route');
|
||||||
|
|
||||||
|
@ -86,7 +87,7 @@ class BreadcrumbManager
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generateRoute($request, $index = false)
|
private function generateRoute(Request $request, $index = false)
|
||||||
{
|
{
|
||||||
if ($index) {
|
if ($index) {
|
||||||
$route = preg_replace('`_.*$`','_index', $request->get('_route'));
|
$route = preg_replace('`_.*$`','_index', $request->get('_route'));
|
||||||
|
@ -97,7 +98,7 @@ class BreadcrumbManager
|
||||||
return $this->router->generate($request->get('_route'), $request->get('_route_params'));
|
return $this->router->generate($request->get('_route'), $request->get('_route_params'));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generateKey($request, $index = false)
|
private function generateKey(Request $request, $index = false)
|
||||||
{
|
{
|
||||||
$datas = explode('::', $request->get('_controller'));
|
$datas = explode('::', $request->get('_controller'));
|
||||||
$action = ($index) ? 'index' : str_replace('Action', '', $datas[1]);
|
$action = ($index) ? 'index' : str_replace('Action', '', $datas[1]);
|
||||||
|
|
|
@ -10,7 +10,7 @@ class ObjectBlock extends Block
|
||||||
|
|
||||||
public function getTemplate()
|
public function getTemplate()
|
||||||
{
|
{
|
||||||
if ($this->template == null) {
|
if (empty($this->template)) {
|
||||||
return $this::DEFAULT_TEMPLATE;
|
return $this::DEFAULT_TEMPLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Menu extends BaseMenu
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNodes($criteria = null, PropelPDO $con = null)
|
public function getNodes($criteria = null, \PropelPDO $con = null)
|
||||||
{
|
{
|
||||||
if (!empty($this->nodes)) {
|
if (!empty($this->nodes)) {
|
||||||
return $this->nodes;
|
return $this->nodes;
|
||||||
|
|
|
@ -229,7 +229,7 @@ class Node extends BaseNode
|
||||||
|
|
||||||
public function setUrl($v)
|
public function setUrl($v)
|
||||||
{
|
{
|
||||||
if (null == $this->oldUrl) {
|
if (null === $this->oldUrl) {
|
||||||
$this->oldUrl = $this->url;
|
$this->oldUrl = $this->url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class TemplateType extends BaseAbstractType
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($options['use_ace_editor'] == true) {
|
if ($options['use_ace_editor'] === true) {
|
||||||
$builder->add(
|
$builder->add(
|
||||||
'content',
|
'content',
|
||||||
'ace_editor',
|
'ace_editor',
|
||||||
|
|
|
@ -54,7 +54,7 @@ class SearchPage extends Page implements SeoPageInterface, PageableInterface
|
||||||
|
|
||||||
public function getPager()
|
public function getPager()
|
||||||
{
|
{
|
||||||
if (null == $this->pager) {
|
if (null === $this->pager) {
|
||||||
$this->initPager();
|
$this->initPager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
namespace Trinity\Bundle\SlideshowBundle\Block;
|
namespace Trinity\Bundle\SlideshowBundle\Block;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\File\File;
|
|
||||||
use Trinity\Bundle\ContentManagerBundle\Model\Block;
|
use Trinity\Bundle\ContentManagerBundle\Model\Block;
|
||||||
use Trinity\Component\File\FileUploadInterface;
|
|
||||||
use Trinity\Bundle\SlideshowBundle\Model\SlideshowItemQuery;
|
|
||||||
use Trinity\Bundle\SlideshowBundle\Model\SlideshowItemPeer;
|
use Trinity\Bundle\SlideshowBundle\Model\SlideshowItemPeer;
|
||||||
|
|
||||||
class SlideshowItemsContainerBlock extends Block
|
class SlideshowItemsContainerBlock extends Block
|
||||||
|
@ -14,7 +11,7 @@ class SlideshowItemsContainerBlock extends Block
|
||||||
|
|
||||||
public function getTemplate()
|
public function getTemplate()
|
||||||
{
|
{
|
||||||
if ($this->template == null) {
|
if (empty($this->template)) {
|
||||||
return $this::DEFAULT_TEMPLATE;
|
return $this::DEFAULT_TEMPLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +28,7 @@ class SlideshowItemsContainerBlock extends Block
|
||||||
|
|
||||||
public function getSlideshowItems($criteria = null, \PropelPDO $con = null)
|
public function getSlideshowItems($criteria = null, \PropelPDO $con = null)
|
||||||
{
|
{
|
||||||
if(is_null($criteria)) {
|
if (is_null($criteria)) {
|
||||||
$criteria = new \Criteria();
|
$criteria = new \Criteria();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,11 +41,4 @@ class SlideshowItemsContainerBlock extends Block
|
||||||
{
|
{
|
||||||
return parent::getSlideshowItems(null, null);
|
return parent::getSlideshowItems(null, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*public function getName()
|
|
||||||
{
|
|
||||||
return 'block_slideshow_item_container';
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue