Skip to content

Instantly share code, notes, and snippets.

@MagePsycho
Forked from Vinai/M2 acl.xml
Created February 13, 2016 14:16
Show Gist options
  • Save MagePsycho/3fda8af1918d09679c97 to your computer and use it in GitHub Desktop.
Save MagePsycho/3fda8af1918d09679c97 to your computer and use it in GitHub Desktop.
My current Magento 2 PHPStorm File Templates (Feb 2016)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
</resource>
</resources>
</acl>
</config>
{
"name": "${COMPOSER_NAME}",
"description": "${DESCRIPTION}",
"require": {
"php": "~5.6.0|~7.0.0"
},
"type": "magento2-module",
"license": [
"BSD-3-Clause"
],
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"${NAMESPACE}\\\\${MODULE_NAME}\\": ""
}
}
}
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="${EVENT_NAME}">
<observer name="${OBSERVER_NAME}" instance="${OBSERVER_CLASS}" shared="false"/>
</event>
</config>
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
</body>
</page>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="${MODULE_NAME}" setup_version="0.1.0">
</module>
</config>
<?php
use Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::MODULE, '${MODULE_NAME}', __DIR__);
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="${ROUTE_NAME}" frontName="${ROUTE_NAME}">
<module name="${MODULE_NAME}" />
</route>
</router>
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
</system>
</config>
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
</routes>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment