-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathremoveAttribute.php
More file actions
27 lines (22 loc) · 890 Bytes
/
removeAttribute.php
File metadata and controls
27 lines (22 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require dirname(__FILE__) . '/app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
class Outslide extends \Magento\Framework\App\Http
implements \Magento\Framework\AppInterface {
public function launch()
{
$setup = $this->_objectManager->create('\Magento\Framework\Setup\ModuleDataSetupInterface');
$eavSetupFactory = $this->_objectManager->create('\Magento\Eav\Setup\EavSetupFactory');
$eavSetup = $eavSetupFactory->create(['setup' => $setup]);
$eavSetup->removeAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'test_attribute'
);
echo 'Done!';
//the method must end with this line
return $this->_response;
}
}
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Outslide');
$bootstrap->run($app);