Skip to content

Instantly share code, notes, and snippets.

@michaelmcandrew
Last active March 28, 2017 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelmcandrew/ab2309eb8ebc14d147f968d9c18e3e23 to your computer and use it in GitHub Desktop.
Save michaelmcandrew/ab2309eb8ebc14d147f968d9c18e3e23 to your computer and use it in GitHub Desktop.
Using composer in extensions
{
"name": "3sd/whizzy",
"description": "Blah blah blah...",
"authors": [
{
"name": "Michael McAndrew",
"email": "michaelmcandrew@thirdsectordesign.org"
}
],
"require": {
"simshaun/recurr": "^2.2"
}
}
<?php
class CRM_Whizzy_Page_Whiz extends CRM_Core_Page {
public function run() {
$rule = new \Recurr\Rule;
parent::run();
// etc...
<?php
require __DIR__ . '/vendor/autoload.php';
require_once 'whizzy.civix.php';
/**
* Implements hook_civicrm_config().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
*/
function whizzy_civicrm_config(&$config) {
_whizzy_civix_civicrm_config($config);
}
// etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment