2017 © Pedro Peláez
 

craft-module helpers

Craft CMS 3 helpers module

image

marknotton/helpers

Craft CMS 3 helpers module

  • Tuesday, July 31, 2018
  • by marknotton
  • Repository
  • 1 Watchers
  • 0 Stars
  • 66 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 340 % Grown

The README.md

Helpers module for Craft CMS 3

Requirements

This module requires Craft 3, (*1)

Installation

To install the module, follow these instructions., (*2)

You will need to add the following content to your config/app.php file. This ensures that your module will get loaded for each request. You can remove components if you don't require the full set of features this module offers., (*3)

return [
  'modules' => [
    'helpers' => [
      'class' => \modules\helpers\Helpers::class,
      'components' => [
        'service' => [ 'class' => 'modules\helpers\services\Services' ],
        'query'   => [ 'class' => 'modules\helpers\services\Queries'  ],
        'request' => [ 'class' => 'modules\helpers\services\Requests' ]
      ],
    ]
  ],
  'bootstrap' => ['helpers'],
];

You'll also need to make sure that you incorporate the following to your project's composer.json file:, (*4)

"require": {
  "oomphinc/composer-installers-extender": "^1.1",
  "marknotton/helpers": "dev-master"
},
"autoload": {
  "psr-4": {
    "modules\\": "modules/",
    "modules\\helpers\\": "modules/helpers/module/"
  }
},
"extra": {
  "installer-types": ["craft-module"],
  "installer-paths": {
    "modules/{$name}": ["type:craft-module"]
  }
},

Composer Installers Extender is what allows you to create your own Package Type. The craft-module package type I'm using is not native to Craft, and there-for not supported by Composer Installers. Package types allow you to define extra settings that tell Composer to put this module into the modules directory. It's the only way you can reliably manage this module within your project., (*5)

After you have added this, you may need to run composer dump-autoload from the project’s root directory to rebuild the Composer autoload map. This will happen automatically any time you do a composer install or composer update as well., (*6)

The Versions

31/07 2018

dev-master

9999999-dev

Craft CMS 3 helpers module

  Sources   Download

MIT

The Requires

 

cms craftcms craft craft-module

21/06 2018

1.0.2

1.0.2.0

Craft CMS 3 helpers module

  Sources   Download

MIT

cms craftcms craft craft-module

13/04 2018

1.0.1

1.0.1.0

Craft CMS 3 helpers module

  Sources   Download

MIT

The Requires

 

cms craftcms craft craft-module