public function getProjectSummary() { $textmaster_data_with_cookies_manager_obj = new TextMasterDataWithCookiesManager(); $_POST = $textmaster_data_with_cookies_manager_obj->getAllProject(); $args = $this->module_instance->formatProjectArguments(); $total_price = $this->module_instance->quoteProject($args, $textmaster_data_with_cookies_manager_obj->getProjectData('project_name'), $textmaster_data_with_cookies_manager_obj->getSelectedProductsIds()); $total_words = 0; $words = $this->module_instance->countProductWords($textmaster_data_with_cookies_manager_obj->getSelectedProductsIds()); foreach ($words as $element => $langs) { if (in_array($element, $textmaster_data_with_cookies_manager_obj->getProjectProjectData())) { $lang = $textmaster_data_with_cookies_manager_obj->getProjectData('ctype') . '_language_from'; $lang = $textmaster_data_with_cookies_manager_obj->getProjectData($lang); if (isset($langs[$lang])) { $total_words += $langs[$lang]; } } } $this->context->smarty->assign(array('summary' => $textmaster_data_with_cookies_manager_obj, 'languages' => $this->textmasterAPI->getLanguages(), 'categories' => $this->textmasterAPI->getCategories(), 'audiences' => $this->textmasterAPI->getSelectOf('audiences'), 'grammatical_persons' => $this->textmasterAPI->getSelectOf('grammatical_persons'), 'language_levels' => $this->textmasterAPI->getSelectOf('service_levels'), 'vocabulary_levels' => $this->textmasterAPI->getSelectOf('vocabulary_levels'), 'total_words' => $total_words, 'total_price' => $total_price, 'documents' => $this->getDocumentsData())); }