Download the PHP package awsmug/torro-forms-plugin-boilerplate without Composer

On this page you can find all versions of the php package awsmug/torro-forms-plugin-boilerplate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package torro-forms-plugin-boilerplate

Build Status Code Climate Test Coverage Latest Stable Version License

Torro Forms Plugin Boilerplate

This is a plugin boilerplate for a Torro Forms extension. It is highly encouraged to use this boilerplate when building any extension for Torro Forms.

Getting Started

To create your own plugin, download this repository. For the next steps, let's assume your plugin should be called Torro Super Extension.

  1. Rename the directory to torro-super-extension.
  2. Rename the plugin main file to torro-super-extension.php.
  3. Open gulpfile.js and scroll to the bottom.
  4. Replace every value in the replacements object with your new plugin name or plugin author data in the appropriate format. For example, replace my-new-plugin-name with torro-super-extension, MY_NEW_PLUGIN_NAME with TORRO_SUPER_EXTENSION and so on. Replace the plugin namespace vendor, plugin URL, author name, author email and author URL with your respective data.
  5. Save the changes.
  6. Run npm install in the console.
  7. Run gulp init-replace in the console.
  8. Open gulpfile.js again and remove the entire bottom section that starts with INITIAL SETUP TASK, save the file afterwards.
  9. Check the composer.json and package.json files. You might wanna update some details to your preferences.
  10. Check the top of gulpfile.js, containing the config object. You might wanna update some details to your preferences.
  11. Run gulp build once to compile everything.

Now you're good to go! One more thing: If you want to publish the plugin on wordpress.org, it's recommended to remove the /languages directory, plus set the config.domainPath to false and remove the pot task in gulpfile.js. Then, remove the now unnecessary arguments from the Extension::load_textdomain() method accordingly.

Actual Development

Adjust the src/extension.php file to your needs. This is where your extension will get bootstrapped. You can instantiate the services your extension needs here, setup hooks (which will then be automatically invoked by the Torro Forms main plugin) and more.

All further classes and assets in the boilerplate is optional and simply sample code. Just bear in mind, you should stick to the directory structure used in the boilerplate - it is oriented after the Torro Forms base plugin.

Common Gulp Tasks


All versions of torro-forms-plugin-boilerplate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
composer/installers Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package awsmug/torro-forms-plugin-boilerplate contains the following files

Loading the files please wait ....