Skip to content

Commit 90ab855

Browse files
committed
Merge pull request #3 from KeyteqLabs/fix-pencil-overflowing
Fix pencil overflowing
2 parents efcf011 + 43c6d8f commit 90ab855

File tree

6 files changed

+13
-46
lines changed

6 files changed

+13
-46
lines changed

src/KTQ/Bundle/eZExceedBundle/Controller/DefaultController.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/KTQ/Bundle/eZExceedBundle/Model/Pencil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ public function __construct( $serviceContainer, Repository $repository, PageServ
104104

105105
public function fill($input)
106106
{
107+
$this->entities = array();
107108
if (is_array($input)) {
108109
foreach ($input as $key => $value) {
109110
// Arrays of blocks are not supported
110-
if($value instanceof Block)
111-
return false;
111+
if ($value instanceof Block) { return false; }
112112

113113
// Array contains Contents or Locations
114114
if (is_numeric($key)) {

src/KTQ/Bundle/eZExceedBundle/Resources/config/routing.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/KTQ/Bundle/eZExceedBundle/Resources/doc/index.rst

Whitespace-only changes.

src/KTQ/Bundle/eZExceedBundle/Tests/Controller/DefaultControllerTest.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/KTQ/Bundle/eZExceedBundle/Twig/eZExceedTwigExtension.php

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Twig_Extension;
66
use Twig_Function_Method;
7-
//use Twig_Filter_Method;
87
use Twig_Environment;
98
use Twig_Template;
109
use Symfony\Component\Templating\EngineInterface;
@@ -21,19 +20,19 @@ class eZExceedTwigExtension extends Twig_Extension
2120
protected $templateEngine;
2221
protected $pencil;
2322

24-
public function __construct(
25-
Repository $repository,
26-
LegacyConfigResolver $legacyConfigResolver,
27-
EngineInterface $templateEngine,
28-
Pencil $pencil)
23+
public function __construct(Repository $repository, LegacyConfigResolver $legacyConfigResolver, EngineInterface $templateEngine, Pencil $pencil)
2924
{
3025
$this->repository = $repository;
3126
$this->legacyConfigResolver = $legacyConfigResolver;
3227
$this->templateEngine = $templateEngine;
33-
3428
$this->pencil = $pencil;
3529
}
3630

31+
/**
32+
* Get function names provided by extension
33+
*
34+
* @return array
35+
*/
3736
public function getFunctions()
3837
{
3938
return array(
@@ -42,6 +41,11 @@ public function getFunctions()
4241
);
4342
}
4443

44+
/**
45+
* Get name of twig extension
46+
*
47+
* @return string
48+
*/
4549
public function getName()
4650
{
4751
return 'ktq_ezexceed';
@@ -100,11 +104,4 @@ public function getIniSetting( $name, $section, $file )
100104

101105
return $this->legacyConfigResolver->getParameter( $section . '.' . $name, $file );
102106
}
103-
104-
/*
105-
public function translate( string $string, string $context )
106-
{
107-
// return translated string
108-
}
109-
*/
110107
}

0 commit comments

Comments
 (0)