Skip to content

Commit

Permalink
Merge pull request #3 from KeyteqLabs/fix-pencil-overflowing
Browse files Browse the repository at this point in the history
Fix pencil overflowing
  • Loading branch information
nervetattoo committed Sep 20, 2013
2 parents efcf011 + 43c6d8f commit 90ab855
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 46 deletions.
10 changes: 0 additions & 10 deletions src/KTQ/Bundle/eZExceedBundle/Controller/DefaultController.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/KTQ/Bundle/eZExceedBundle/Model/Pencil.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public function __construct( $serviceContainer, Repository $repository, PageServ

public function fill($input)
{
$this->entities = array();
if (is_array($input)) {
foreach ($input as $key => $value) {
// Arrays of blocks are not supported
if($value instanceof Block)
return false;
if ($value instanceof Block) { return false; }

// Array contains Contents or Locations
if (is_numeric($key)) {
Expand Down
3 changes: 0 additions & 3 deletions src/KTQ/Bundle/eZExceedBundle/Resources/config/routing.yml

This file was deleted.

Empty file.

This file was deleted.

25 changes: 11 additions & 14 deletions src/KTQ/Bundle/eZExceedBundle/Twig/eZExceedTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Twig_Extension;
use Twig_Function_Method;
//use Twig_Filter_Method;
use Twig_Environment;
use Twig_Template;
use Symfony\Component\Templating\EngineInterface;
Expand All @@ -21,19 +20,19 @@ class eZExceedTwigExtension extends Twig_Extension
protected $templateEngine;
protected $pencil;

public function __construct(
Repository $repository,
LegacyConfigResolver $legacyConfigResolver,
EngineInterface $templateEngine,
Pencil $pencil)
public function __construct(Repository $repository, LegacyConfigResolver $legacyConfigResolver, EngineInterface $templateEngine, Pencil $pencil)
{
$this->repository = $repository;
$this->legacyConfigResolver = $legacyConfigResolver;
$this->templateEngine = $templateEngine;

$this->pencil = $pencil;
}

/**
* Get function names provided by extension
*
* @return array
*/
public function getFunctions()
{
return array(
Expand All @@ -42,6 +41,11 @@ public function getFunctions()
);
}

/**
* Get name of twig extension
*
* @return string
*/
public function getName()
{
return 'ktq_ezexceed';
Expand Down Expand Up @@ -100,11 +104,4 @@ public function getIniSetting( $name, $section, $file )

return $this->legacyConfigResolver->getParameter( $section . '.' . $name, $file );
}

/*
public function translate( string $string, string $context )
{
// return translated string
}
*/
}

0 comments on commit 90ab855

Please sign in to comment.