Function Hook_task_import_newsletter_subscribers->run
Definitions
sources/hooks/systems/tasks/import_newsletter_subscribers.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 |
|---|---|---|---|---|---|---|---|
| $_language | LANGUAGE_NAME | No | No | required parameter | N/A | N/A | The language for subscribers |
| $newsletter_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The newsletter being imported into |
| $subscribe | boolean | No | No | required parameter | N/A | N/A | Whether we are subscribing the member (true=adding, false=removing) |
| $path | PATH | No | No | required parameter | N/A | N/A | The path of the file to import |
| $filename | ?string | No | No | Null | N/A | N/A | The filename of the file to import (null: detect from $path) |
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 LANGUAGE_NAME $_language The language for subscribers
* @param AUTO_LINK $newsletter_id The newsletter being imported into
* @param boolean $subscribe Whether we are subscribing the member (true=adding, false=removing)
* @param PATH $path The path of the file to import
* @param ?string $filename The filename of the file to import (null: detect from $path)
* @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(string $_language, int $newsletter_id, bool $subscribe, string $path, ?string $filename = null) : ?array
* Run the task hook.
*
* @param LANGUAGE_NAME $_language The language for subscribers
* @param AUTO_LINK $newsletter_id The newsletter being imported into
* @param boolean $subscribe Whether we are subscribing the member (true=adding, false=removing)
* @param PATH $path The path of the file to import
* @param ?string $filename The filename of the file to import (null: detect from $path)
* @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(string $_language, int $newsletter_id, bool $subscribe, string $path, ?string $filename = null) : ?array

