123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Framework\Setup\Declaration\Schema\Operations;
- use Magento\Framework\Setup\Declaration\Schema\ElementHistory;
- use Magento\Framework\Setup\Declaration\Schema\OperationInterface;
- /**
- * Drop foreign key operation.
- */
- class DropReference implements OperationInterface
- {
- /**
- * Operation name.
- */
- const OPERATION_NAME = 'drop_reference';
- /**
- * @var DropElement
- */
- private $dropElement;
- /**
- * Constructor.
- *
- * @param DropElement $dropElement
- */
- public function __construct(DropElement $dropElement)
- {
- $this->dropElement = $dropElement;
- }
- /**
- * @inheritdoc
- */
- public function isOperationDestructive()
- {
- return true;
- }
- /**
- * @inheritdoc
- */
- public function getOperationName()
- {
- return self::OPERATION_NAME;
- }
- /**
- * @inheritdoc
- */
- public function doOperation(ElementHistory $elementHistory)
- {
- return $this->dropElement->doOperation($elementHistory);
- }
- }
|