Skip to content

Commit 46b9ae5

Browse files
committed
Create renameAttributeCategory.php
1 parent 4b2e389 commit 46b9ae5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: renameAttributeCategory.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
require dirname(__FILE__) . '/app/bootstrap.php';
4+
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
5+
6+
class Outslide extends \Magento\Framework\App\Http
7+
implements \Magento\Framework\AppInterface {
8+
public function launch()
9+
{
10+
11+
$setup = $this->_objectManager->create('\Magento\Framework\Setup\ModuleDataSetupInterface');
12+
13+
$eavSetup = $this->_objectManager->get('\Magento\Catalog\Setup\CategorySetupFactory');
14+
15+
$catalogSetup = $eavSetup->create(['setup' => $setup]);
16+
$catalogSetup->updateAttribute('catalog_category', 'xml_sitemap_exclude', array('attribute_code' => 'sitemap_exclude'));
17+
18+
echo 'Done!';
19+
//the method must end with this line
20+
return $this->_response;
21+
}
22+
}
23+
24+
/** @var \Magento\Framework\App\Http $app */
25+
$app = $bootstrap->createApplication('Outslide');
26+
$bootstrap->run($app);

0 commit comments

Comments
 (0)