Skip to content
Snippets Groups Projects
Commit ce50ff6f authored by Vadim Justus's avatar Vadim Justus
Browse files

Add module template

parent 626f8cbc
Branches
No related tags found
No related merge requests found
<?php
/**
* Copyright (c) 2020 TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see https://www.techdivision.com/
*
* To obtain a valid license for using this software please contact us at
* license@techdivision.com
*/
declare(strict_types=1);
namespace Workshop\OrderExport\Console;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
/**
* @copyright Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* @link https://www.techdivision.com/
* @author Vadim Justus <v.justus@techdivision.com>
*/
class OrderExportCommand extends Command
{
/**
* @inheritdoc
*/
protected function configure()
{
$this->setName('workshop:order:export')
->setDescription('Executed order export for given order ID.');
parent::configure();
}
/**
* @inheritdoc
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// put in some code here ;)
return 0;
}
}
{
"name": "workshop/order-export",
"description": "Workshop: Example order export module",
"type": "magento2-module",
"license": "proprietary",
"require": {
"magento/framework": "103.0.*"
}
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Workshop\\OrderExport\\": ""
}
}
}
<?xml version="1.0"?>
<!--
/**
* Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see https://www.techdivision.com/
*
* To obtain a valid license for using this software please contact us at
* license@techdivision.com
*/
/**
* @copyright Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* @link https://www.techdivision.com/
* @author Vadim Justus <v.justus@techdivision.com>
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\Console\CommandListInterface">
<arguments>
<argument name="commands" xsi:type="array">
<item name="workshopOrderExport" xsi:type="object">Workshop\OrderExport\Console\OrderExportCommand</item>
</argument>
</arguments>
</type>
</config>
<?xml version="1.0"?>
<!--
/**
* Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see https://www.techdivision.com/
*
* To obtain a valid license for using this software please contact us at
* license@techdivision.com
*/
/**
* @copyright Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* @link https://www.techdivision.com/
* @author Vadim Justus <v.justus@techdivision.com>
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Workshop_OrderExport" />
</config>
<?php
/**
* Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see https://www.techdivision.com/
*
* To obtain a valid license for using this software please contact us at
* license@techdivision.com
*/
/**
* @copyright Copyright (c) 2020 TechDivision GmbH <info@techdivision.com> - TechDivision GmbH
* @link https://www.techdivision.com/
* @author Vadim Justus <v.justus@techdivision.com>
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Workshop_OrderExport',
__DIR__
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment