first import
[projectpier.git] / application / models / config_handlers / complex / FileStorageConfigHandler.class.php
blobd955e77b1beb9798bfe81d3b374bd12fc06d5d68
1 <?php
3 /**
4 * Let user select where he wants to store uploaded files
6 * @http://www.projectpier.org/
7 */
8 class FileStorageConfigHandler extends ConfigHandler {
10 /**
11 * Render form control
13 * @param string $control_name
14 * @return string
16 function render($control_name) {
17 $options = array();
19 $option_attributes = $this->getValue() == FILE_STORAGE_FILE_SYSTEM ? array('selected' => 'selected') : null;
20 $options[] = option_tag(lang('file storage file system'), FILE_STORAGE_FILE_SYSTEM, $option_attributes);
22 $option_attributes = $this->getValue() == FILE_STORAGE_MYSQL ? array('selected' => 'selected') : null;
23 $options[] = option_tag(lang('file storage mysql'), FILE_STORAGE_MYSQL, $option_attributes);
25 return select_box($control_name, $options);
26 } // render
28 } // FileStorageConfigHandler