private function getHooksDirectorySettingHelper() {
    // Set the module folder based on variable.
    // First try the drush 'data' option.
    if (drush_get_option('data')) {
      $directory = drush_get_option('data');
      if ($directory) {
        // In pure Drush, the hooks folder contains subfolder for hooks for
        // each major version of Drupal.
        if (substr($directory, -1, 1) != '/') {
          $directory .= '/';
        }
        $directory .= $this->getCoreMajorVersion();
        return $directory;
      }
    }
    // Second, use the config setting, in case we're in drush, but the site has
    // Module Builder running as a module.
    $directory = $this->getSetting('data_directory', 'hooks');
    return $directory;
  }