3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class generates form components for File System Path.
21 class CRM_Admin_Form_Setting_Path
extends CRM_Admin_Form_Setting
{
23 protected $_settings = [
24 'uploadDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
25 'imageUploadDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
26 'customFileUploadDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
27 'customTemplateDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
28 'customPHPPathDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
29 'extensionsDir' => CRM_Core_BAO_Setting
::DIRECTORY_PREFERENCES_NAME
,
33 * Build the form object.
35 * @throws \CRM_Core_Exception
37 public function buildQuickForm() {
38 CRM_Utils_System
::setTitle(ts('Settings - Upload Directories'));
39 parent
::buildQuickForm();
42 'uploadDir' => ts('Temporary Files'),
43 'imageUploadDir' => ts('Images'),
44 'customFileUploadDir' => ts('Custom Files'),
45 'customTemplateDir' => ts('Custom Templates'),
46 'customPHPPathDir' => ts('Custom PHP Path Directory'),
47 'extensionsDir' => ts('CiviCRM Extensions Directory'),
49 foreach ($directories as $name => $title) {
50 //$this->add('text', $name, $title);
52 ts("'%1' directory does not exist",