-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
9 changed files
with
92 additions
and
53 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
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
use Sonata\AdminBundle\Form\FormMapper; | ||
use Sonata\AdminBundle\Form\Type\ModelListType; | ||
use Sonata\BlockBundle\Block\BlockContextInterface; | ||
use Sonata\BlockBundle\Block\Service\AbstractAdminBlockService; | ||
use Sonata\BlockBundle\Block\Service\AbstractBlockService; | ||
use Sonata\BlockBundle\Meta\Metadata; | ||
use Sonata\BlockBundle\Model\BlockInterface; | ||
use Sonata\Doctrine\Model\ManagerInterface; | ||
|
@@ -34,13 +34,14 @@ | |
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
use Symfony\Component\Templating\EngineInterface; | ||
use Twig\Environment; | ||
|
||
/** | ||
* @final since sonata-project/media-bundle 3.21.0 | ||
* | ||
* @author Thomas Rabaix <[email protected]> | ||
*/ | ||
class GalleryBlockService extends AbstractAdminBlockService | ||
class GalleryBlockService extends AbstractBlockService | ||
{ | ||
/** | ||
* @var ManagerInterface | ||
|
@@ -53,11 +54,18 @@ class GalleryBlockService extends AbstractAdminBlockService | |
protected $galleryManager; | ||
|
||
/** | ||
* @param string $name | ||
* @var ContainerInterface | ||
*/ | ||
public function __construct($name, EngineInterface $templating, ContainerInterface $container, ManagerInterface $galleryManager) | ||
private $container; | ||
|
||
/** | ||
* NEXT_MAJOR: Remove `$templating` argument. | ||
* | ||
* @param Environment|string $twigOrName | ||
*/ | ||
public function __construct($twigOrName, ?EngineInterface $templating, ContainerInterface $container, ManagerInterface $galleryManager) | ||
{ | ||
parent::__construct($name, $templating); | ||
parent::__construct($twigOrName, $templating); | ||
|
||
$this->galleryManager = $galleryManager; | ||
$this->container = $container; | ||
|
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 |
---|---|---|
|
@@ -17,28 +17,29 @@ | |
use Sonata\AdminBundle\Form\FormMapper; | ||
use Sonata\AdminBundle\Form\Type\ModelListType; | ||
use Sonata\BlockBundle\Block\BlockContextInterface; | ||
use Sonata\BlockBundle\Block\Service\AbstractAdminBlockService; | ||
use Sonata\BlockBundle\Block\Service\AbstractBlockService; | ||
use Sonata\BlockBundle\Meta\Metadata; | ||
use Sonata\BlockBundle\Model\BlockInterface; | ||
use Sonata\Doctrine\Model\ManagerInterface; | ||
use Sonata\Form\Type\ImmutableArrayType; | ||
use Sonata\MediaBundle\Admin\BaseMediaAdmin; | ||
use Sonata\MediaBundle\Model\MediaInterface; | ||
use Sonata\MediaBundle\Provider\Pool; | ||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilder; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
use Symfony\Component\Templating\EngineInterface; | ||
use Twig\Environment; | ||
|
||
/** | ||
* @final since sonata-project/media-bundle 3.21.0 | ||
* | ||
* @author Thomas Rabaix <[email protected]> | ||
*/ | ||
class MediaBlockService extends AbstractAdminBlockService | ||
class MediaBlockService extends AbstractBlockService | ||
{ | ||
/** | ||
* @var BaseMediaAdmin | ||
|
@@ -51,11 +52,22 @@ class MediaBlockService extends AbstractAdminBlockService | |
protected $mediaManager; | ||
|
||
/** | ||
* @param string $name | ||
* @var ContainerInterface | ||
*/ | ||
public function __construct($name, EngineInterface $templating, ContainerInterface $container, ManagerInterface $mediaManager) | ||
{ | ||
parent::__construct($name, $templating); | ||
private $container; | ||
|
||
/** | ||
* NEXT_MAJOR: Remove `$templating` argument. | ||
* | ||
* @param Environment|string $twigOrName | ||
*/ | ||
public function __construct( | ||
$twigOrName, | ||
?EngineInterface $templating, | ||
ContainerInterface $container, | ||
ManagerInterface $mediaManager | ||
) { | ||
parent::__construct($twigOrName, $templating); | ||
|
||
$this->mediaManager = $mediaManager; | ||
$this->container = $container; | ||
|
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