public function PoDatabaseWriter::setOptions in Drupal 9
Same name and namespace in other branches
- 8 core/modules/locale/src/PoDatabaseWriter.php \Drupal\locale\PoDatabaseWriter::setOptions()
Set the options for the current writer.
Parameters
array $options: An associative array containing:
- overwrite_options: An array of options. Each option contains:
- not_customized: Boolean indicating that not customized strings should be overwritten.
- customized: Boolean indicating that customized strings should be overwritten.
- customized: The strings being imported should be saved as customized. One of LOCALE_CUSTOMIZED or LOCALE_NOT_CUSTOMIZED.
File
- core/
modules/ locale/ src/ PoDatabaseWriter.php, line 123
Class
- PoDatabaseWriter
- Gettext PO writer working with the locale module database.
Namespace
Drupal\localeCode
public function setOptions(array $options) {
if (!isset($options['overwrite_options'])) {
$options['overwrite_options'] = [];
}
$options['overwrite_options'] += [
'not_customized' => FALSE,
'customized' => FALSE,
];
$options += [
'customized' => LOCALE_NOT_CUSTOMIZED,
];
$this->options = $options;
}