You are here

function Provision_Service_Certificate_LetsEncrypt::config_data in Aegir HTTPS 7.3

Pass additional values to the config file templates.

Even though the $server variable will be available in your template files, you may wish to pass additional calculated values to your template files.

Consider this something like the hook_preprocess stuff in drupal.

File

submodules/letsencrypt/drush/Provision/Service/Certificate/LetsEncrypt.php, line 42

Class

Provision_Service_Certificate_LetsEncrypt
A LetsEncrypt implementation of the Certificate service type.

Code

function config_data($config = null, $class = null) {

  // This format of calling the parent is very important!
  $data = parent::config_data($config, $class);

  /**
   * This value will become available as $letsencrypt_current_time
   * in all the config files generated by this service.
   *
   * You could also choose to only conditionally pass values based on
   * the parameters.
   */
  $data['letsencrypt_current_time'] = date(DATE_COOKIE, time());
  return $data;
}