Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magento/magento2-samples
[ONLY Magento 2.0.x Compatible] Code samples for Magento developers
https://github.com/magento/magento2-samples
Last synced: 3 months ago
JSON representation
[ONLY Magento 2.0.x Compatible] Code samples for Magento developers
- Host: GitHub
- URL: https://github.com/magento/magento2-samples
- Owner: magento
- License: osl-3.0
- Archived: true
- Created: 2020-11-04T18:49:56.000Z (over 3 years ago)
- Default Branch: 2.1
- Last Pushed: 2020-11-04T18:54:59.000Z (over 3 years ago)
- Last Synced: 2024-01-17T19:57:00.747Z (5 months ago)
- Language: PHP
- Size: 576 KB
- Stars: 68
- Watchers: 9
- Forks: 76
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-magento2 - Magento 2 Code Samples - Samples to introduce and demonstrate new technologies in Magento 2. (Open Source Extensions / Official Resources)
README
## Synopsis
This project is a collection of samples to demonstrate technologies introduced in Magento 2. You will find the most simple extension along with samples that incrementally add features to lead you through a exploration and education of the Magento 2 platform.
## Motivation
The intent is to learn by example, following our best practices for developing a modular site using Magento 2.
## Installation
Each sample is packaged and available individually at `repo.magento.com`. For convenience and demonstration of our bundling of modules, we have included the [sample-bundle-all](sample-bundle-all) composer metapackage. Including this dependency in your Magento project is the more convenient way to integrate the full set of examples. Refer to that sample for more detailed installation instructions.
To install any of these samples, you'll need to be sure that your root `composer.json` file contains a reference to the repository that contains them. To do so, add the following to `composer.json`:
```json
"repositories": [
{
"type": "composer",
"url": "http://repo.magento.com/"
}
]
```The above can also be added using the Composer command line with the command:
composer config repositories.magento composer http://repo.magento.com/
### Registration
New in Magento 2 is the ability to *register* modules to install anywhere under the Magento root directory; typically, under the `vendor` subdirectory.All sample modules have a `registration.php` in their root directory with contents similar to the following:
```php