Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacquesbh/installer
PHP command line tool for Magento extension development and scaffolding
https://github.com/jacquesbh/installer
Last synced: 11 days ago
JSON representation
PHP command line tool for Magento extension development and scaffolding
- Host: GitHub
- URL: https://github.com/jacquesbh/installer
- Owner: jacquesbh
- License: gpl-3.0
- Created: 2011-11-11T21:02:09.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-07-11T14:01:03.000Z (over 2 years ago)
- Last Synced: 2024-10-15T19:36:53.789Z (23 days ago)
- Language: PHP
- Homepage:
- Size: 238 KB
- Stars: 38
- Watchers: 11
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- mageres - The Installer - PHP command line tool for Magento extension development and scaffolding (Tools / Free)
README
# The Installer
The Installer is under the General Public License. See the `COPYING` for further information.
## What's that?
The "Installer" is a *simple* shell which allows you to create custom modules on Magento.
### V2
The second version will be developped with the Console component of Symfony. If you want help us to build it, let me know!
## Install
### Via Docker
Run the following:
`cd docker-binary && docker build --tag installer:latest .`
Then you can use the docker image like this where you want to use the Installer:
```
docker run --rm -ti -v $PWD:/work installer:latest
```### On UNIX
Puppet file:
# step by step
git clone git://github.com/jacquesbh/installer.git /usr/local/src/installer
ln -s /usr/local/src/installer/bin/Installer /usr/local/bin/installer
Don't forget to pull sometimes ;)cd /usr/local/src/Installer && git pull
### On Windows
... Sorry dude ;)
## Howto
### Configure
Each time I need to use The Installer, I've a git repository.
Because it's always a Magento project and I always use git as SCM.```sh
git config jbh-installer.company-name "The Company"
git config jbh-installer.company-name-short "company"
git config jbh-installer.user-name "John Doe"
git config jbh-installer.user-email "[email protected]"
git config jbh-installer.company-url "http://example.org"
```You can use the following configuration path:
* `path`: The path to the "app" directory. (optional)
* `company-name`: The name of your company.
* `company-name-short`: The namespace of your company.
* `company-url`: The website url of your company.
* `user-name`: Your name.
* `user-email`: Your email.
* `license`: The license used. "All rights reserved" as default.
* `design`: The project's design. "base_default" as default.
* `locales`: The project's locales. "fr_FR,en_US" as default.In the lastest version the Installer will ask you those information.
### Binary
You can use the binary `bin/Installer`.
Just create a simple symlink link.
### Run it!
With your shell, go under your magento dir, like that :
$ cd ~/Sites/magento/
Then run the Installer! (with the function above)
$ installer
The Installer - by jacquesbh
>### Help
Type `?`!
> ?
---------------------- ----------------------- -------------------------------------------
| COMMAND | ALIAS | PARAMETERS |
|----------------------|-----------------------|-------------------------------------------|
| help | -h ? | |
| module | mod | namespace name pool |
| general | | |
| info | i config conf | |
| clean | | [all, cache, log(s)] |
| controller | c | name [actions] |
| helper | h | name [methods] |
| model | m | name [methods] |
| observer | o | name [methods] |
| observer Observer | oo | [methods] |
| block | b | name [methods] [-p] |
| translate | t | where |
| translates | ts | |
| layout | l | where |
| layouts | ls | |
| resources | res | |
| entity | ent | name table |
| grid | | entity |
| form | | entity |
|----------------------|-----------------------|-------------------------------------------|
| COMMAND | ALIAS | PARAMETERS |
|----------------------|-----------------------|-------------------------------------------|
| setup | sql set | |
| data | | [[from] to] |
| upgrade | up | [from] to |
| event | | name model method where |
| cron | | identifier 1 2 3 4 5 model method |
| default | def conf | name value |
| depends | dep | (-)module |
| exit | | |
| delete | del rm remove | |
| last | | [...] |
| addtranslate | __ | |
| routers | r route router | where frontName |
| tmp | | action |
| misc | script | name (without .php) |
| doc | | [title] |
| system | | |
| adminhtml | | |
| session | | [methods] |
| email | mail | name |
| | | |
---------------------- ----------------------- -------------------------------------------
>### Example
$ installer
The Installer - by jacquesbh
> mod jbh demo local
Using: Jbh_Demo in local
Jbh_Demo> ent
Entity?
> foo
Table?
> jbh_foo
Jbh_Demo> h data -
Jbh_Demo> layout
Where? (enter for front)
>
Jbh_Demo> session
Jbh_Demo>Easy, isn't it ?
### Tips
#### Variables?
Jbh_Tmp> model foo $_iAmProtected $_meToo=1 $iAmPublic $meToo=array $iAmNull=null $iAmAString=foo $_iAmBoolean=false
```php
model foo I_AM_CONSTANT I_AM_A_STRING=foo I_AM_INTEGER=123 I_AM_BOOLEAN=true```php
model foo _iAmProtected iAmPublic iReturnsBool:bool iReturnsObject:Varien_Object iCallMyParent/p iHaveArgs() iHaveArgsAndIReturnsBool():bool _iHaveArgsIReturnsStringICallDad():string/p
Return for iCallMyParent()?
> string
Params for iHaveArgs()?
> $customer
Params for iHaveArgsAndIReturnsBool()?
> $flag
Params for iHaveArgsIReturnsStringICallDad()?
> $order```php
doc Title if you want :)This command creates a simple directory named `doc` with a file `README.md`.
The idea is to use _Easybook_ for generate the documentation in PDF or website formats.
## system.xml & adminhtml.xml
You can generate those files but you need to edit them after.
It's customized samples.