Function Hook_task_import_rss->run

Definitions

sources/hooks/systems/tasks/import_rss.php

  • Run the task hook.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$is_validated BINARY No No required parameter N/A N/A Whether to import as validated
$download_images BINARY No No required parameter N/A N/A Whether to download remote images
$to_own_account BINARY No No required parameter N/A N/A Whether to import everything to the task initiator's account
$import_blog_comments BINARY No No required parameter N/A N/A Whether to import comments
$import_to_blog BINARY No No required parameter N/A N/A Whether to import everything to blog news categories
$rss object No No required parameter N/A N/A The parsed RSS feed

Returns

  • A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Run the task hook.
 *
 * @param  BINARY $is_validated Whether to import as validated
 * @param  BINARY $download_images Whether to download remote images
 * @param  BINARY $to_own_account Whether to import everything to the task initiator's account
 * @param  BINARY $import_blog_comments Whether to import comments
 * @param  BINARY $import_to_blog Whether to import everything to blog news categories
 * @param  object $rss The parsed RSS feed
 * @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
 */

public function run(int $is_validated, int $download_images, int $to_own_account, int $import_blog_comments, int $import_to_blog, object $rss) : ?array