public static function setNodeStatus($node_id, $status) { return lingotek_keystore('node', $node_id, 'node_sync_status', $status); }
public function preDownload($lingotek_locale, $completed) { if ($completed) { lingotek_keystore($this->getEntityType(), $this->getId(), 'target_sync_status_' . $lingotek_locale, LingotekSync::STATUS_READY); } }
/** * Adds advanced parameters for use with addContentDocument and updateContentDocument. * * @param array $parameters * An array of API request parameters. * @param object $entity * A Drupal entity object. */ private function addAdvancedParameters(&$parameters, LingotekTranslatableEntity $entity) { // 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_keystore($entity->getEntityType(), $entity->getId(), '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); } }