/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Indexer/Handler/AttributeHandler.php
41 строка
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\Framework\Indexer\Handler; use Magento\Framework\App\ResourceConnection\SourceProviderInterface; use Magento\Framework\Indexer\HandlerInterface; class AttributeHandler implements HandlerInterface { /** * Prepare SQL for field and add it to collection * * @param SourceProviderInterface $source * @param string $alias * @param array $fieldInfo * @return void * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareSql(SourceProviderInterface $source, $alias, $fieldInfo) { if (isset($fieldInfo['bind'])) { if (!method_exists($source, 'joinAttribute')) { return; } $source->joinAttribute( $fieldInfo['name'], $fieldInfo['entity'] . '/' . $fieldInfo['origin'], $fieldInfo['bind'], null, 'left' ); } else { $source->addFieldToSelect($fieldInfo['origin'], 'left'); } } }