private function LingotekApi::addAdvancedParameters in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::addAdvancedParameters()
- 7.3 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::addAdvancedParameters()
- 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::addAdvancedParameters()
- 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::addAdvancedParameters()
- 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::addAdvancedParameters()
Adds advanced parameters for use with addContentDocument and updateContentDocument.
Parameters
array $parameters: An array of API request parameters.
object $node: A Drupal node object.
3 calls to LingotekApi::addAdvancedParameters()
- LingotekApi::addContentDocument in lib/
Drupal/ lingotek/ LingotekApi.php - Add a document to the Lingotek platform.
- LingotekApi::getCommentCreateWithTargetsParams in lib/
Drupal/ lingotek/ LingotekApi.php - Gets the comment-specific parameters for use in a createContentDocumentWithTargets API call.
- LingotekApi::updateContentDocument in lib/
Drupal/ lingotek/ LingotekApi.php - Updates the content of an existing Lingotek document with the current node contents.
File
- lib/
Drupal/ lingotek/ LingotekApi.php, line 1028 - Defines Drupal\lingotek\LingotekApi
Class
- LingotekApi
- @file Defines Drupal\lingotek\LingotekApi
Code
private function addAdvancedParameters(&$parameters, $node) {
// Extra parameters when using advanced XML configuration.
$advanced_parsing_enabled = variable_get('lingotek_advanced_parsing', FALSE);
$use_advanced_parsing = $advanced_parsing_enabled || !$advanced_parsing_enabled && lingotek_lingonode($node->nid, 'use_advanced_parsing');
if ($use_advanced_parsing) {
$fprmFileContents = variable_get('lingotek_advanced_xml_config1', '');
$secondaryFprmFileContents = variable_get('lingotek_advanced_xml_config2', '');
if (!strlen($fprmFileContents) || !strlen($secondaryFprmFileContents)) {
lingotek_set_default_advanced_xml();
$fprmFileContents = variable_get('lingotek_advanced_xml_config1', '');
$secondaryFprmFileContents = variable_get('lingotek_advanced_xml_config2', '');
}
$advanced_parameters = array(
'fprmFileContents' => $fprmFileContents,
'secondaryFprmFileContents' => $secondaryFprmFileContents,
'secondaryFilter' => 'okf_html',
);
$parameters = array_merge($parameters, $advanced_parameters);
}
}