/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Model/ResourceModel/Db/DeleteEntityRow.php
46 строк
988 B
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\Model\ResourceModel\Db; use Magento\Framework\EntityManager\MetadataPool; /** * Delete entity row. */ class DeleteEntityRow { /** * @var MetadataPool */ protected $metadataPool; /** * @param MetadataPool $metadataPool */ public function __construct( MetadataPool $metadataPool ) { $this->metadataPool = $metadataPool; } /** * Delete entity row. * * @param string $entityType * @param array $data * @return bool * @throws \Exception */ public function execute($entityType, $data) { $metadata = $this->metadataPool->getMetadata($entityType); $connection = $metadata->getEntityConnection(); return $connection->delete( $metadata->getEntityTable(), [$metadata->getLinkField() . ' = ?' => $data[$metadata->getLinkField()]] ); } }