src/module-elasticsuite-catalog-optimizer/Ui/DataProvider/AddConfigField.php
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
* versions in the future.
*
* @category Smile
* @package Smile\ElasticsuiteCatalogOptimizer
* @author Pierre Gauthier <pierre.gauthier@smile.fr>
* @copyright 2021 Smile
* @license Open Software License ("OSL") v. 3.0
*/
namespace Smile\ElasticsuiteCatalogOptimizer\Ui\DataProvider;
use Magento\Framework\Data\Collection;
use Magento\Ui\DataProvider\AddFieldToCollectionInterface;
/**
* Add config field to collection
*
* @category Smile
* @package Smile\ElasticsuiteCatalogOptimizer
* @author Pierre Gauthier <pierre.gauthier@smile.fr>
*/
class AddConfigField implements AddFieldToCollectionInterface
{
/**
* {@inheritdoc}
*/
public function addField(Collection $collection, $field, $alias = null)
{
$collection->addFieldToSelect('config');
}
}