forked from hyva-themes/magento2-hyva-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add collection grid source type processor
Add collection specific source type processor to allow joining fields before the available grid columns are extracted. Fixes issue hyva-themes#45.
- Loading branch information
Showing
4 changed files
with
75 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Hyva\Admin\Api; | ||
|
||
use Magento\Framework\Data\Collection\AbstractDb as AbstractDbCollection; | ||
|
||
/** | ||
* Collection grid source type specific processor interface. | ||
*/ | ||
interface HyvaGridCollectionProcessorInterface extends HyvaGridSourceProcessorInterface | ||
{ | ||
/** | ||
* This interface provides an afterInitSelect() callback that is only applicable to collection grid sources. | ||
* | ||
* This callback is triggered every time the collection grid source is instantiated, before the search | ||
* criteria is applied. It is intended to allow joining additional fields that will then be available | ||
* as grid columns. | ||
* | ||
* @param AbstractDbCollection $source | ||
* @param string $gridName | ||
*/ | ||
public function afterInitSelect(AbstractDbCollection $source, string $gridName): void; | ||
} |
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