* Generate configuration files
*/
class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
+
public function run() {
$this->setupCms();
}
public function setupCms() {
- if (!in_array($this->config->cms, array(
+ if (!in_array($this->config->cms, [
'backdrop',
'drupal',
'drupal8',
'joomla',
'wordpress',
- ))) {
+ ])) {
echo "Config file for '{$this->config->cms}' not known.";
exit();
}
* path to config template
*/
public function findConfigTemplate($cms) {
- $candidates = array();
+ if (getenv('GENCODE_CONFIG_TEMPLATE')) {
+ return getenv('GENCODE_CONFIG_TEMPLATE');
+ }
+
+ $candidates = [];
switch ($cms) {
case 'backdrop':
// FIXME!!!!