The initial release of this module was created as a proof of concept. It enables the CiviVolunteer extension by hardcoding that into .install. Ideally this module would pull an array of extensions from the distribution and loop through that so that the same module can be used for multiple distributions.

Comments

totten’s picture

So something like this pseudocode -- https://gist.github.com/totten/54d42961903889869510 ?

kreynen’s picture

If we use the .info of the profile, this can be even simpler by only checking the info of the active profile.

$current_profile = drupal_get_profile();
$info = drupal_parse_info_file('profiles/' . $current_profile . '/' . $current_profile . '.info');

By adding lines after the dependencies of .info like...

dependencies[] = civicrm
dependencies[] = civicrmtheme

civicrm_extensions[] = org.civicrm.volunteer
civicrm_extensions[] = nz.co.fuzion.extendedreport

$info will return an array that looks something like...

Array
(
    [name] => CiviCRM Starter Kit
    [description] => Install Drupal and CiviCRM with commonly used modules included, but not enabled or configured.  
Use the CiviCRM Checklist to complete the configuration.
    [distribution_name] => CiviCRM Starter Kit
    [core] => 7.x
    [dependencies] => Array
        (
            [0] => block
            [1] => color
            [2] => comment
            [3] => contextual
            [4] => dashboard
            [5] => help
            [6] => image
            [7] => list
            [8] => menu
            [9] => number
            [10] => options
            [11] => path
            [12] => taxonomy
            [13] => dblog
            [14] => search
            [15] => shortcut
            [16] => toolbar
            [17] => overlay
            [18] => field_ui
            [19] => file
            [20] => rdf
            [21] => civicrm
            [22] => civicrmtheme
        )

    [civicrm_extensions] => Array
        (
            [0] => org.civicrm.volunteer
            [1] => nz.co.fuzion.extendedreport
        )

    [version] => 7.x-4.4-rc6
    [project] => civicrm_starterkit
    [datestamp] => 1386632605
)