Skip to content

Commit

Permalink
Apply Feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
martineiber committed Jul 24, 2024
1 parent a3b1272 commit 58954ab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/03_Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ A filter is a way to filter the data in the grid. One Property of getting the gr
Here you can define `page`, `pageSize` and `includeDescendants`.

`page` is the page number of the data you want to get.
`pageSize` is the number of items you want to get. `
includeDescendants` is a boolean value to include the descendants of the current item.
`pageSize` is the number of items you want to get.
`includeDescendants` is a boolean value to include the descendants of the current item.
2 changes: 1 addition & 1 deletion src/Asset/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getAssetFolder(int $id): Folder
$asset = $this->assetSearchService->getAssetById($id);

if (!$asset instanceof Folder) {
throw new NotFoundException('folder', $id);
throw new NotFoundException(ElementTypes::TYPE_FOLDER, $id);
}

$this->eventDispatcher->dispatch(
Expand Down
3 changes: 2 additions & 1 deletion src/DataIndex/Grid/GridSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Pimcore\Bundle\StudioBackendBundle\DataIndex\AssetSearchServiceInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\OpenSearchFilterInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;
use Pimcore\Bundle\StudioBackendBundle\Filter\Service\FilterServiceProviderInterface;
use Pimcore\Bundle\StudioBackendBundle\Grid\MappedParameter\GridParameter;
use Pimcore\Bundle\StudioBackendBundle\Util\Constants\ElementTypes;
Expand All @@ -38,7 +39,7 @@ public function __construct(
}

/**
* @throws NotFoundException
* @throws NotFoundException|SearchException
*/
public function searchAssets(GridParameter $gridParameter): AssetSearchResult
{
Expand Down
4 changes: 3 additions & 1 deletion src/DataIndex/Grid/GridSearchInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
namespace Pimcore\Bundle\StudioBackendBundle\DataIndex\Grid;

use Pimcore\Bundle\StudioBackendBundle\DataIndex\AssetSearchResult;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;
use Pimcore\Bundle\StudioBackendBundle\Grid\MappedParameter\GridParameter;

/**
Expand All @@ -25,7 +27,7 @@
interface GridSearchInterface
{
/**
* @throw NotFoundException
* @throws NotFoundException|SearchException
*/
public function searchAssets(GridParameter $gridParameter): AssetSearchResult;
}
2 changes: 1 addition & 1 deletion src/Grid/Service/GridService.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getAssetGrid(GridParameter $gridParameter): Collection
$data[] = $this->getGridDataForElement(
$this->getConfigurationFromArray($gridParameter->getColumns()),
$asset,
'asset'
ElementTypes::TYPE_ASSET
);
}

Expand Down

0 comments on commit 58954ab

Please sign in to comment.