Created
July 11, 2017 14:42
-
-
Save imcbride/cbdea5a9c007961c1920487d621d10db to your computer and use it in GitHub Desktop.
middlebury_profile_sync install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains install, uninstall and update functions for Middlebury Profile Sync. | |
*/ | |
/** | |
* Implements hook_install(). | |
*/ | |
function middlebury_profile_sync_install() { | |
$directory = file_default_scheme() . '://middlebury_profile_sync'; | |
// This would ideally use file_prepare_directory(), but that doesn't create | |
// the directory with sufficient write permissions and a check against the | |
// function in the module code later fails. | |
if (!is_dir($directory)) { | |
$file_system = \Drupal::service('file_system'); | |
$file_system->mkdir($directory, 0777); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment