/** * @param SitePress $sitepress * @param TranslationManagement $iclTranslationManagement * @param WPML_Element_Translation_Job $job_instance */ function __construct(&$sitepress, &$iclTranslationManagement, $job_instance) { parent::__construct($sitepress); $this->tm_instance = $iclTranslationManagement; $this->current_element_index = 0; $this->job_instance = $job_instance; $this->job = $job_instance->get_basic_data(); if ($job_instance->get_translator_id() <= 0) { $job_instance->assign_to($sitepress->get_wp_api()->get_current_user_id(), 'local'); } }
/** * @param WPDB $wpdb * @param SitePress $sitepress * @param TranslationManagement $iclTranslationManagement * @param WPML_Element_Translation_Job $job_instance * @param WPML_TM_Job_Action_Factory $job_factory * @param WPML_TM_Job_Layout $job_layout */ function __construct(&$wpdb, &$sitepress, &$iclTranslationManagement, $job_instance, $job_factory, $job_layout) { parent::__construct($wpdb, $sitepress); $this->tm_instance = $iclTranslationManagement; $this->job_instance = $job_instance; $this->job = $job_instance->get_basic_data(); $this->job_factory = $job_factory; $this->job_layout = $job_layout; if ($job_instance->get_translator_id() <= 0) { $job_instance->assign_to($sitepress->get_wp_api()->get_current_user_id(), 'local'); } $job_instance->maybe_load_terms_from_post_into_job($sitepress->get_setting('tm_block_retranslating_terms')); }