ew Folder', 'elementor' ), 'type' => self::FOLDER_RESOURCE_TYPE, 'templateType' => 'folder', 'parentId' => null, ]; $response = $app->post_resource( $resource_data ); return (int) $response['id']; } public function update_item( $template_data ) { return $this->get_app()->update_resource( $template_data ); } public function search_templates( array $args = [] ) { return $this->get_app()->get_resources( $args ); } public function export_template( $id ) { $data = $this->get_app()->get_resource( [ 'id' => $id ] ); if ( is_wp_error( $data ) ) { return new \WP_Error( 'export_template_error', 'An error has occurred' ); } if ( static::TEMPLATE_RESOURCE_TYPE === $data['type'] ) { $this->handle_export_file( $data ); } if ( static::FOLDER_RESOURCE_TYPE === $data['type'] ) { $this->handle_export_folder( $id ); } } protected function handle_export_file( array $data ): void { $file_data = $this->prepare_template_export( $data ); if ( is_wp_error( $file_data ) ) { return; } $this->send_file_headers( $file_data['name'], strlen( $file_data['content'] ) ); $this->serve_file( $file_data['content'] ); } protected function handle_export_folder( int $folder_id ) { $data = $this->get_item_children( [ 'template_id' => $folder_id ] ); if ( empty( $data['templates'] ) ) { throw new \Exception( 'Folder does not have any templates to export' ); } $template_ids = array_map( fn( $template ) => $template['template_id'], $data['templates'] ); $this->export_multiple_templates( $template_ids ); } private function prepare_template_export( $data ) { if ( empty( $data['content'] ) ) { throw new \Exception( 'Template data not found' ); } $data['content'] = json_decode( $data['content'], true ); if ( empty( $data['content']['content'] ) ) { throw new \Exception( 'The template is empty' ); } $export_data = [ 'content' => $data['content']['content'], 'page_settings' => $data['content']['page_settings'] ?? [], 'version' => DB::DB_VERSION, 'title' => $data['title'], 'type' => $data['templateType'], ]; $this->attach_global_styles_to_data( $export_data, $export_data['content'], (int) ( $data['id'] ?? 0 ), [ 'global_classes' => $data['content']['global_classes'] ?? null, 'global_variables' => $data['content']['global_variables'] ?? null, ] ); return [ 'name' => 'elementor-' . $data['id'] . '-' . gmdate( 'Y-m-d' ) . '.json', 'content' => wp_json_encode( $export_data ), ]; } public function export_multiple_templates( array $template_ids ) { $files = []; $temp_path = Plugin::$instance->uploads_manager->create_unique_dir(); foreach ( $template_ids as $template_id ) { $files[] = $this->get_file_item( $template_id, $temp_path ); } if ( empty( $files ) ) { throw new \Exception( 'There are no files to export (probably all the requested templates are empty).' ); } list( $zip_archive_filename, $zip_complete_path ) = $this->handle_zip_file( $temp_path, $files ); $this->send_file_headers( $zip_archive_filename, $this->filesize( $zip_complete_path ) ); $this->serve_zip( $zip_complete_path ); Plugin::$instance->uploads_manager->remove_file_or_dir( $temp_path ); } protected function handle_zip_file( string $temp_path, array $files ): array { if ( ! class_exists( 'ZipArchive' ) ) { throw new \Error( 'ZipArchive module missing' ); } $zip_archive_filename = 'elementor-templates-' . gmdate( 'Y-m-d' ) . '.zip'; $zip_archive = new \ZipArchive(); $zip_complete_path = $temp_path . '/' . $zip_archive_filename; $zip_archive->open( $zip_complete_path, \ZipArchive::CREATE ); foreach ( $files as $file ) { $zip_archive->addFile( $file['path'], $file['name'] ); } $zip_archive->close(); return [ $zip_archive_filename, $zip_complete_path ]; } private function get_file_item( $template_id, string $temp_path ) { $data = $this->get_app()->get_resource( [ 'id' => $template_id ] ); $file_data = $this->prepare_template_export( $data ); if ( is_wp_error( $file_data ) ) { return; } $complete_path = $temp_path . $file_data['name']; $put_contents = file_put_contents( $complete_path, $file_data['content'] ); if ( ! $put_contents ) { throw new \Exception( sprintf( 'Cannot create file "%s".', esc_html( $file_data['name'] ) ) ); } return [ 'path' => $complete_path, 'name' => $file_data['name'], ]; } public function move_template_to_folder( array $args = [] ) { $move_args = [ 'title' => $args['title'], 'id' => $args['from_template_id'], 'parentId' => ! empty( $args['parentId'] ) ? (int) $args['parentId'] : '', ]; return $this->update_item( $move_args ); } public function move_bulk_templates_to_folder( array $args = [] ) { $move_args = [ 'ids' => $args['from_template_id'], 'parentId' => ! empty( $args['parentId'] ) ? (int) $args['parentId'] : null, ]; return $this->get_app()->bulk_move_templates( $move_args ); } public function save_item_preview( $template_id, $data ) { return $this->get_app()->update_resource_preview( $template_id, $data ); } public function mark_preview_as_failed( $template_id, $data ) { return $this->get_app()->mark_preview_as_failed( $template_id, $data ); } /** * @param int $template_id * @return Document|\WP_Error * @throws \Exception If the user has no permission or the post is not found. */ public function create_document_for_preview( int $template_id ) { if ( ! current_user_can( 'edit_posts' ) ) { return new \WP_Error( Exceptions::FORBIDDEN, esc_html__( 'You do not have permission to create preview documents.', 'elementor' ) ); } $cloud_library_app = $this->get_app(); $template = $cloud_library_app->get_resource( [ 'id' => $template_id ] ); if ( is_wp_error( $template ) ) { $error_message = $template->get_error_message(); throw new \Exception( esc_html( $error_message ), Exceptions::FORBIDDEN ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped } $decoded_content = json_decode( $template['content'], true ); return $this->save_document_for_preview( [ 'content' => $decoded_content['content'], 'page_settings' => $decoded_content['page_settings'], ] ); } protected function save_document_for_preview( $template_content ) { $template_data = [ 'title' => esc_html__( '(no title)', 'elementor' ), 'page_settings' => $template_content['page_settings'] ?? [], 'status' => 'draft', 'type' => 'container', ]; $document = Plugin::$instance->documents->create( Cloud_Template_Preview::TYPE, [ 'post_title' => $template_data['title'], 'post_status' => $template_data['status'], ] ); if ( is_wp_error( $document ) ) { wp_die(); } $template_data['content'] = $this->replace_elements_ids( $template_content['content'] ); $document->save( [ 'elements' => $template_data['content'], 'settings' => $template_data['page_settings'], ] ); do_action( 'elementor/template-library/after_save_template', $document->get_main_id(), $template_data ); do_action( 'elementor/template-library/after_update_template', $document->get_main_id(), $template_data ); return $document; } public function bulk_delete_items( array $template_ids ) { return $this->get_app()->bulk_delete_resources( $template_ids ); } public function bulk_undo_delete_items( array $template_ids ) { return $this->get_app()->bulk_undo_delete_resources( $template_ids ); } public function save_bulk_items( array $data = [] ) { $items = []; foreach ( $data as $template_data ) { $items[] = $this->format_resource_item_for_create( $template_data ); } return $this->get_app()->post_bulk_resources( $items ); } public function get_bulk_items( array $args = [] ) { return $this->get_app()->get_bulk_resources_with_content( $args ); } public function get_quota() { return $this->get_app()->get_quota(); } public function import_template( $name, $path, $import_mode = 'match_site' ) { if ( empty( $path ) ) { return new \WP_Error( 'file_error', 'Please upload a file to import' ); } Plugin::$instance->uploads_manager->set_elementor_upload_state( true ); $items = []; $quota = $this->get_quota(); if ( is_wp_error( $quota ) ) { return $quota; } if ( $quota['currentUsage'] >= $quota['threshold'] ) { return new \WP_Error( 'quota_error', 'The upload failed because you’ve saved the maximum templates already.' ); } if ( 'zip' === pathinfo( $name, PATHINFO_EXTENSION ) ) { $extracted_files = Plugin::$instance->uploads_manager->extract_and_validate_zip( $path, [ 'json' ] ); if ( is_wp_error( $extracted_files ) ) { Plugin::$instance->uploads_manager->remove_file_or_dir( $extracted_files['extraction_directory'] ); return $extracted_files; } $items_to_save = []; foreach ( $extracted_files['files'] as $file_path ) { // Skip macOS metadata files and folders if ( false !== strpos( $file_path, '__MACOSX' ) || '.' === basename( $file_path )[0] ) { continue; } $prepared = $this->prepare_import_template_data( $file_path, $import_mode ); if ( is_wp_error( $prepared ) ) { // Skip failed templates continue; } $items_to_save[] = $this->format_resource_item_for_create( $prepared ); } $is_quota_valid = $this->validate_quota( $items_to_save ); if ( is_wp_error( $is_quota_valid ) ) { return $is_quota_valid; } if ( ! $is_quota_valid ) { return new \WP_Error( 'quota_error', 'The upload failed because it will pass the maximum templates you can save.' ); } $items = $this->get_app()->post_bulk_resources( $items_to_save ); Plugin::$instance->uploads_manager->remove_file_or_dir( $extracted_files['extraction_directory'] ); } else { $prepared = $this->prepare_import_template_data( $path, $import_mode ); if ( is_wp_error( $prepared ) ) { return $prepared; } $is_quota_valid = $this->validate_quota( [ $prepared ] ); if ( is_wp_error( $is_quota_valid ) ) { return $is_quota_valid; } if ( ! $is_quota_valid ) { return new \WP_Error( 'quota_error', 'The upload failed because it will pass the maximum templates you can save.' ); } $item = $this->get_app()->post_resource( $this->format_resource_item_for_create( $prepared ) ); if ( is_wp_error( $item ) ) { return $item; } $items[] = $item; } return $items; } public function validate_quota( $items ) { $quota = $this->get_quota(); if ( is_wp_error( $quota ) ) { return $quota; } return $quota['currentUsage'] + count( $items ) <= $quota['threshold']; } public function format_args_for_bulk_action( $args ) { $templates = $this->get_bulk_items( $args ); $bulk_args = []; foreach ( $templates as $template ) { $content = json_decode( $template['content'], true ); $bulk_args[] = array_merge( $args, [ 'title' => $template['title'], 'type' => $template['type'], 'content' => $content['content'], 'page_settings' => $content['page_settings'], ] ); } return $bulk_args; } public function format_args_for_single_action( $args ) { $data = $this->get_item( $args['from_template_id'] ); if ( is_wp_error( $data ) || empty( $data['content'] ) ) { return new \WP_Error( 'template_error', 'Unable to format template args.' ); } $decoded_data = json_decode( $data['content'], true ); $args['content'] = $decoded_data['content']; $args['page_settings'] = $decoded_data['page_settings']; return $args; } } විෂය පථයන් 13ක් ඔස්සේ බහු විෂයික පර්යේෂණ සමුළුවක් ලෙස 19 වන ජාත්‍යන්තර පර්යේෂණ සමුළුව අගෝස්තුවේදී පැවැත්වීමට කොතලාවල ආරක්ෂක විශ්වවිද්‍යාලය සූදානම් වෙයි – ttvnews.lk
  • About
  • Advertise
  • Privacy & Policy
  • Contact
ttvnews.lk
Advertisement
  • දේශීය
  • ව්‍යාපාර
  • විදෙස්
  • ක්‍රීඩා
  • විශේෂාංග
  • සංවර්ධන
  • වෙනත්
  • Contact Us
No Result
View All Result
  • දේශීය
  • ව්‍යාපාර
  • විදෙස්
  • ක්‍රීඩා
  • විශේෂාංග
  • සංවර්ධන
  • වෙනත්
  • Contact Us
No Result
View All Result
ttvnews.lk
No Result
View All Result
Home පුවත් දේශීය

විෂය පථයන් 13ක් ඔස්සේ බහු විෂයික පර්යේෂණ සමුළුවක් ලෙස 19 වන ජාත්‍යන්තර පර්යේෂණ සමුළුව අගෝස්තුවේදී පැවැත්වීමට කොතලාවල ආරක්ෂක විශ්වවිද්‍යාලය සූදානම් වෙයි

20 May 2026
in දේශීය, පුවත්
විෂය පථයන් 13ක් ඔස්සේ  බහු විෂයික පර්යේෂණ සමුළුවක් ලෙස  19 වන ජාත්‍යන්තර පර්යේෂණ සමුළුව  අගෝස්තුවේදී පැවැත්වීමට  කොතලාවල ආරක්ෂක විශ්වවිද්‍යාලය සූදානම් වෙයි
0
SHARES
5
VIEWS
Share on FacebookShare on Twitter
ජනරාල් සර් ජෝන් කොතලාවල ආරක්ෂක විශ්වවිද්‍යාලය (KDU) මඟින් වාර්ෂිකව සංවිධානය කරනු ලබන “19 වන ජාත්‍යන්තර පර්යේෂණ සමුළුව” (19th International Research Conference) මෙවර විෂය පථයන් 13ක් ඔස්සේ බහු විෂයික පර්යේෂණ සමුළුවක් (Multidisciplinary Research Conference) ලෙස ඉතා උසස් අන්දමින් පැවැත්වීමට කටයුතු සූදානම් කර ඇති බව එම විශ්වවිද්‍යාලයේ උපකුලපති රියර් අද්මිරාල් එච්. ජී. යූ. ධම්මික කුමාර මහතා ප්‍රකාශ කළේය. රජයේ ප්‍රවෘත්ති දෙපාර්තමේන්තු ශ්‍රවණාගාරයේදී අද (20) පැවැති විශේෂ මාධ්‍ය හමුවකට එක්වෙමින් උපකුලපතිවරයා මේ බව සඳහන් කළේය.
ඒ අනුව, මෙවර 19 වන ජාත්‍යන්තර පර්යේෂණ සමුළුව එළඹෙන 2026 අගෝස්තු මස 20 සහ 21 යන දෙදින පුරා රත්මලාන කොතලාවල ආරක්ෂක විශ්වවිද්‍යාලයීය පරිශ්‍රයේදී පැවැත්වීමට නියමිතය. වර්තමානය වන විට සමස්ත ලෝකයම දේශගුණික, කාලගුණික, පාරිසරික මෙන්ම ආර්ථික වශයෙන් විවිධාකාර වූ බරපතළ අභියෝග හා ගැටලුවලට මුහුණ පා සිටින බව පෙන්වා දුන් උපකුලපතිවරයා, එම ගෝලීය ගැටලුවලට සාර්ථකව මුහුණ දීම සඳහා අවශ්‍ය නව්‍ය විද්‍යාත්මක විසඳුම් හා නිර්දේශ ඉදිරිපත් කිරීම මෙම සමුළුවේ මූලික අරමුණක් බව අවධාරණය කළේය.
Post Views: 17
Previous Post

වසරේ ගතවූ මාස කිහිපයට ඩෙංගු රෝගීන් 29,000 ඉක්මවයි

Next Post

පුත්තලම සිට කොළඹ සහ ගාල්ල හරහා හම්බන්තොට දක්වා මුහුද රළු වේ

Editor TTV News

Editor TTV News

Next Post
පුත්තලම සිට කොළඹ සහ ගාල්ල හරහා  හම්බන්තොට දක්වා මුහුද රළු වේ

පුත්තලම සිට කොළඹ සහ ගාල්ල හරහා හම්බන්තොට දක්වා මුහුද රළු වේ

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected test

  • 23.9k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest
BOC බැංකුවෙන් ගනුදෙනුකරුවන්ට පණිවිඩයක්

BOC බැංකුවෙන් ගනුදෙනුකරුවන්ට පණිවිඩයක්

5 June 2025
භාතිය ගැන මේ දැන් ලැබුණු ආරංචිය

භාතිය ගැන මේ දැන් ලැබුණු ආරංචිය

8 July 2025
ලෝකයේම වෛරල් වූ සංවේදී  AI වීඩියෝවේ කතාව ඇත්තක්

ලෝකයේම වෛරල් වූ සංවේදී  AI වීඩියෝවේ කතාව ඇත්තක්

15 August 2025
72 Miss World  තරඟයෙන්  ඈ ඉවත් වෙයි

72 Miss World තරඟයෙන් ඈ ඉවත් වෙයි

22 May 2025
The blog was launched asresult organizing

The blog was launched asresult organizing

0
The inbound marketing methodology method of drawing the right

The inbound marketing methodology method of drawing the right

0
onprofit organization that seeks provide inform

onprofit organization that seeks provide inform

0
the blog include climate politics, lgbq issue,

the blog include climate politics, lgbq issue,

0
නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ  තරුණයා  හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ තරුණයා හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

17 July 2026
කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

17 July 2026
හිටපු පොලිස්පති  සී.ඩී. වික්‍රමරත්න  වෙඩි වැදීමෙන් මියයයි

හිටපු පොලිස්පති සී.ඩී. වික්‍රමරත්න වෙඩි වැදීමෙන් මියයයි

17 July 2026
ඇමෙරිකානු ප්‍රහාර වලින් ඉරානයේ  පාලම්, ගුවන් තොටුපොළ සහ  දුම්රිය ස්ථානයක් විනාශ වෙයි

ඇමෙරිකානු ප්‍රහාර වලින් ඉරානයේ පාලම්, ගුවන් තොටුපොළ සහ දුම්රිය ස්ථානයක් විනාශ වෙයි

17 July 2026

Recent News

නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ  තරුණයා  හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ තරුණයා හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

17 July 2026
කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

17 July 2026
හිටපු පොලිස්පති  සී.ඩී. වික්‍රමරත්න  වෙඩි වැදීමෙන් මියයයි

හිටපු පොලිස්පති සී.ඩී. වික්‍රමරත්න වෙඩි වැදීමෙන් මියයයි

17 July 2026
ඇමෙරිකානු ප්‍රහාර වලින් ඉරානයේ  පාලම්, ගුවන් තොටුපොළ සහ  දුම්රිය ස්ථානයක් විනාශ වෙයි

ඇමෙරිකානු ප්‍රහාර වලින් ඉරානයේ පාලම්, ගුවන් තොටුපොළ සහ දුම්රිය ස්ථානයක් විනාශ වෙයි

17 July 2026
ttvnews.lk

Follow Us

Browse by Category

  • 2020 පාර්ලිමේන්තුවට යන 225 කවුද?
  • Uncategorised
  • කාලගුණ
  • ක්‍රීඩා
  • දේශීය
  • පුවත්
  • විදෙස්
  • විනිවිද
  • විලාසිතා
  • විශේෂාංග
  • වීඩියෝ
  • වෙනත්
  • ව්‍යාපාර
  • සංවර්ධන

Recent News

නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ  තරුණයා  හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

නවගමුවේ වෙඩි ප්‍රහාරයකට ලක්වූ තරුණයා හෝමාගම රෝහලට මාරුකර යැවීමෙන් පසු මරුට

17 July 2026
කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

කොත්තුවක් කන්න සල්ලි හොයන්න වික්කෙ සර්

17 July 2026
  • දේශීය
  • ව්‍යාපාර
  • විදෙස්
  • ක්‍රීඩා
  • විශේෂාංග
  • සංවර්ධන
  • වෙනත්
  • Contact Us

© 2024 TTVnews.lk All Rights Reserved

No Result
View All Result
  • දේශීය
  • ව්‍යාපාර
  • විදෙස්
  • ක්‍රීඩා
  • විශේෂාංග
  • සංවර්ධන
  • වෙනත්
  • Contact Us

© 2024 TTVnews.lk All Rights Reserved