From aef831234be0f2bc805e7e745d65cd36982a4df3 Mon Sep 17 00:00:00 2001 From: Serhii Vasko Date: Thu, 5 Sep 2024 13:29:08 -0400 Subject: [PATCH] Update data_source.rst Fixed DecoratingDataSource --- docs/reference/data_source.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/reference/data_source.rst b/docs/reference/data_source.rst index a8352d90a..f3d1be4ae 100644 --- a/docs/reference/data_source.rst +++ b/docs/reference/data_source.rst @@ -17,7 +17,6 @@ Here's one way to do it: use Sonata\AdminBundle\Exporter\DataSourceInterface; use Sonata\DoctrineORMAdminBundle\Exporter\DataSource; use Sonata\Exporter\Source\DoctrineORMQuerySourceIterator; - use Sonata\Exporter\Source\SourceIteratorInterface; class DecoratingDataSource implements DataSourceInterface { @@ -28,7 +27,7 @@ Here's one way to do it: $this->dataSource = $dataSource; } - public function createIterator(ProxyQueryInterface $query, array $fields): SourceIteratorInterface + public function createIterator(ProxyQueryInterface $query, array $fields): \Iterator { /** @var DoctrineORMQuerySourceIterator $iterator */ $iterator = $this->dataSource->createIterator($query, $fields); @@ -47,4 +46,3 @@ Here's one way to do it: ... App\Service\Admin\DecoratingDataSource: decorates: 'sonata.admin.data_source.orm' - arguments: ['@App\Services\Admin\DecoratingDataSource.inner']