function awssdk_ui_settings_form in AWS SDK for PHP 7.3
Same name and namespace in other branches
- 7.5 ui/awssdk_ui.module \awssdk_ui_settings_form()
- 7.4 ui/awssdk_ui.module \awssdk_ui_settings_form()
Settings form.
1 string reference to 'awssdk_ui_settings_form'
- awssdk_ui_menu in ui/
awssdk_ui.module - Implements hook_menu().
File
- ui/
awssdk_ui.module, line 30 - Provides primary Drupal hook implementations.
Code
function awssdk_ui_settings_form($form, &$form_state) {
$form['aws_key'] = array(
'#type' => 'textfield',
'#title' => t('Amazon Web Services Key'),
'#default_value' => variable_get('aws_key', ''),
'#required' => TRUE,
'#description' => t('Amazon Web Services Key. Found in the AWS Security Credentials.
You can also pass this value as the first parameter to a service constructor.'),
);
$form['aws_secret_key'] = array(
'#type' => 'textfield',
'#title' => t('Amazon Web Services Secret Key'),
'#default_value' => variable_get('aws_secret_key', ''),
'#required' => TRUE,
'#description' => t('Amazon Web Services Secret Key. Found in the AWS Security Credentials.
You can also pass this value as the second parameter to a service constructor.'),
);
$form['aws_account_id'] = array(
'#type' => 'textfield',
'#title' => t('Amazon Account ID without dashes'),
'#default_value' => variable_get('aws_account_id', ''),
'#description' => t('Amazon Account ID without dashes. Used for identification with Amazon EC2. Found in the AWS Security Credentials.'),
);
$form['aws_canonical_id'] = array(
'#type' => 'textfield',
'#title' => t('Your CanonicalUser ID'),
'#default_value' => variable_get('aws_canonical_id', ''),
'#description' => t('Your CanonicalUser ID. Used for setting access control settings in AmazonS3. Found in the AWS Security Credentials.'),
);
$form['aws_canonical_name'] = array(
'#type' => 'textfield',
'#title' => t('Your CanonicalUser DisplayName'),
'#default_value' => variable_get('aws_canonical_name', ''),
'#description' => t('Your CanonicalUser DisplayName. Used for setting access control settings in AmazonS3. Found in the AWS Security Credentials (i.e. "Welcome, AWS_CANONICAL_NAME").'),
);
$form['aws_certificate_authority'] = array(
'#type' => 'checkbox',
'#title' => t('Determines which Cerificate Authority file to use'),
'#default_value' => variable_get('aws_certificate_authority', ''),
'#description' => t('A value of boolean `false` will use the Certificate Authority file available on the system. A value of boolean `true` will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to `0755`) will use that. Leave this set to `false` if you\'re not sure.'),
);
$form['aws_default_cache_config'] = array(
'#type' => 'textarea',
'#title' => t('Storage type to use for caching'),
'#default_value' => variable_get('aws_default_cache_config', ''),
'#description' => t('This option allows you to configure a preferred storage type to use for caching by default. This can be changed later using the set_cache_config() method. Valid values are: `apc`, `xcache`, a DSN-style string such as `pdo.sqlite:/sqlite/cache.db`, a file system path such as `./cache` or `/tmp/cache/`, or a serialized array for memcached configuration.'),
);
$form['aws_mfa_serial'] = array(
'#type' => 'textfield',
'#title' => t('12-digit serial number'),
'#default_value' => variable_get('aws_mfa_serial', ''),
'#description' => t('12-digit serial number taken from the Gemalto device used for Multi-Factor Authentication. Ignore this if you\'re not using MFA.'),
);
$form['aws_cloudfront_keypair_id'] = array(
'#type' => 'textfield',
'#title' => t('Amazon CloudFront key-pair to use for signing private URLs'),
'#default_value' => variable_get('aws_cloudfront_keypair_id', ''),
'#description' => t('Amazon CloudFront key-pair to use for signing private URLs. Found in the AWS Security Credentials. This can be set programmatically with <AmazonCloudFront::set_keypair_id()>.'),
);
$form['aws_cloudfront_private_key_pem'] = array(
'#type' => 'textfield',
'#title' => t('The contents of the *.pem private key that matches with the CloudFront key-pair ID'),
'#default_value' => variable_get('aws_cloudfront_private_key_pem', ''),
'#description' => t('The contents of the *.pem private key that matches with the CloudFront key-pair ID. Found in the AWS Security Credentials. This can be set programmatically with <AmazonCloudFront::set_private_key()>.'),
);
$form['aws_enable_extensions'] = array(
'#type' => 'checkbox',
'#title' => t('Set the value to true to enable autoloading for classes not prefixed with "Amazon" or "CF"'),
'#default_value' => variable_get('aws_enable_extensions', ''),
'#description' => t('Set the value to true to enable autoloading for classes not prefixed with "Amazon" or "CF". If enabled, load `sdk.class.php` last to avoid clobbering any other autoloaders.'),
);
return system_settings_form($form);
}