Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Removed code that's never called
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Oct 27, 2015
1 parent 37e3aec commit 0f91ddf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Resources/config/twig.xml
Expand Up @@ -10,4 +10,4 @@
</service>
</services>

</container>
</container>
51 changes: 8 additions & 43 deletions Twig/Extension/SonataDoctrinePHPCRAdminExtension.php
Expand Up @@ -12,52 +12,9 @@
namespace Sonata\DoctrinePHPCRAdminBundle\Twig\Extension;

use PHPCR\NodeInterface;
use Sonata\AdminBundle\Admin\FieldDescriptionInterface;

class SonataDoctrinePHPCRAdminExtension extends \Twig_Extension
{
/**
* @var \Twig_Environment
*/
protected $environment;

/**
* {@inheritdoc}
*/
public function initRuntime(\Twig_Environment $environment)
{
$this->environment = $environment;
}

/**
* {@inheritdoc}
*/
public function getName()
{
return 'sonata_doctrine_phpcr_admin';
}

/**
* render a list element from the FieldDescription.
*
* @param object $object
* @param FieldDescriptionInterface $fieldDescription
* @param array $params
*
* @return string
*/
public function renderListElement($object, FieldDescriptionInterface $fieldDescription, $params = array())
{
$template = $this->getTemplate($fieldDescription, 'SonataAdminBundle:CRUD:base_list_field.html.twig');

return $this->output($fieldDescription, $template, array_merge($params, array(
'admin' => $fieldDescription->getAdmin(),
'object' => $object,
'value' => $this->getValueFromFieldDescription($object, $fieldDescription),
'field_description' => $fieldDescription,
)));
}

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -93,4 +50,12 @@ public function renderNodePath(NodeInterface $node)
{
return $node->getPath();
}

/**
* {@inheritdoc}
*/
public function getName()
{
return 'sonata_doctrine_phpcr_admin';
}
}

0 comments on commit 0f91ddf

Please sign in to comment.