forked from FriendsOfAkeneo/CustomEntityBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
5,890 additions
and
2,567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
!docs/examples/bin | ||
bin | ||
vendor | ||
composer.phar | ||
.php_cs.cache | ||
docker-compose.override.yml | ||
|
||
# PhpStorm | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: php | ||
|
||
php: | ||
- "7.2" | ||
- "7.3" | ||
|
||
cache: | ||
directories: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
use Symfony\Component\Routing\Router; | ||
use Symfony\Component\Routing\RouterInterface; | ||
use Symfony\Component\Translation\TranslatorInterface; | ||
use Symfony\Contracts\Translation\TranslatorInterface; | ||
|
||
/** | ||
* @author Antoine Guigan <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,12 @@ | |
|
||
use Pim\Bundle\CustomEntityBundle\Event\ActionEventManager; | ||
use Pim\Bundle\CustomEntityBundle\Manager\Registry as ManagerRegistry; | ||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
use Symfony\Component\Routing\RouterInterface; | ||
use Symfony\Component\Translation\TranslatorInterface; | ||
use Symfony\Contracts\Translation\TranslatorInterface; | ||
use Twig\Environment; | ||
|
||
/** | ||
* @author Antoine Guigan <[email protected]> | ||
|
@@ -19,29 +19,29 @@ | |
abstract class AbstractViewableAction extends AbstractAction | ||
{ | ||
/** | ||
* @var EngineInterface | ||
* @var Environment | ||
*/ | ||
protected $templating; | ||
protected $twig; | ||
|
||
/** | ||
* @param ActionFactory $actionFactory | ||
* @param ActionEventManager $eventManager | ||
* @param ManagerRegistry $managerRegistry | ||
* @param RouterInterface $router | ||
* @param TranslatorInterface $translator | ||
* @param EngineInterface $templating | ||
* @param Environment $twig | ||
*/ | ||
public function __construct( | ||
ActionFactory $actionFactory, | ||
ActionEventManager $eventManager, | ||
ManagerRegistry $managerRegistry, | ||
RouterInterface $router, | ||
TranslatorInterface $translator, | ||
EngineInterface $templating | ||
Environment $twig | ||
) { | ||
parent::__construct($actionFactory, $eventManager, $managerRegistry, $router, $translator); | ||
|
||
$this->templating = $templating; | ||
$this->twig = $twig; | ||
} | ||
|
||
/** | ||
|
@@ -69,7 +69,7 @@ public function renderResponse(array $templateVars = []) | |
$templateVars + $this->getDefaultTemplateVars() | ||
); | ||
|
||
return $this->templating->renderResponse($template, $templateVars); | ||
return $this->twig->render($template, $templateVars); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
parameters: | ||
pim_ui.controller.ajax_option.class: Pim\Bundle\CustomEntityBundle\Controller\AjaxOptionController | ||
pimee_ui.controller.ajax_option.class: Pim\Bundle\CustomEntityBundle\Controller\EnterpriseAjaxOptionController | ||
pimee_product_asset.controller.ajax_option.class: Pim\Bundle\CustomEntityBundle\Controller\EnterpriseAjaxOptionController | ||
pim_custom_entity.rest_controller.class: Pim\Bundle\CustomEntityBundle\Controller\RestController | ||
|
||
services: | ||
pim_custom_entity.controller: | ||
class: '%pim_custom_entity.controller.class%' | ||
scope: request | ||
arguments: | ||
- '@pim_custom_entity.action.factory' | ||
- '@request_stack' | ||
tags: | ||
- { name: controller.service_arguments } | ||
|
||
pim_custom_entity.rest_controller: | ||
class: '%pim_custom_entity.rest_controller.class%' | ||
scope: request | ||
arguments: | ||
- '@pim_custom_entity.configuration.registry' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.