You are here

public function FppFileAccessTest::enablePrivateFileSupport in Fieldable Panels Panes (FPP) 7

Enable the private file storage scheme.

1 call to FppFileAccessTest::enablePrivateFileSupport()
FppFileAccessTest::addPrivateImageField in tests/fpp.file_access.test
Add an image field to the FPP type that uses the private storage mechanism.

File

tests/fpp.file_access.test, line 164
Tests for the Fieldable Panels Panes module to ensure file access works.

Class

FppFileAccessTest
Tests for the Fieldable Panels Panes module to ensure file access works.

Code

public function enablePrivateFileSupport() {

  // Turn on private file access.
  $path = variable_get('file_public_path', conf_path() . '/files') . '/private';
  variable_set('file_private_path', $path);
  $element = array(
    '#value' => $path,
    '#name' => 'file_private_path',
  );
  system_check_directory($element);
}