Remove now-empty function
[civicrm-core.git] / CRM / Admin / Form / Setting / Path.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17
18 /**
19 * This class generates form components for File System Path.
20 */
21 class CRM_Admin_Form_Setting_Path extends CRM_Admin_Form_Setting {
22
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,
30 ];
31
32 /**
33 * Build the form object.
34 *
35 * @throws \CRM_Core_Exception
36 */
37 public function buildQuickForm() {
38 CRM_Utils_System::setTitle(ts('Settings - Upload Directories'));
39 parent::buildQuickForm();
40
41 $directories = [
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'),
48 ];
49 foreach ($directories as $name => $title) {
50 //$this->add('text', $name, $title);
51 $this->addRule($name,
52 ts("'%1' directory does not exist",
53 [1 => $title]
54 ),
55 'settingPath'
56 );
57 }
58
59 }
60
61 }