st_package_factory = $st_package_factory; parent::__construct( $id, $word_count_records, $single_process ); } /** @param int $id */ protected function init( $id ) { if ( $this->st_package_factory ) { $this->st_package = $this->st_package_factory->create( $id ); } } protected function get_type() { return 'package'; } /** @return int */ protected function get_total_words() { return $this->word_count_records->get_package_word_count( $this->id )->get_total_words(); } /** * @param null $label * * @return string */ public function get_type_name( $label = null ) { if ( $this->st_package ) { return $this->st_package->kind; } return __( 'Unknown string Package', 'wpml-translation-management' ); } }