Function Hook_task_import_gallery_media->run
Definitions
sources/hooks/systems/tasks/import_gallery_media.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 |
|---|---|---|---|---|---|---|---|
| $files | array | No | No | required parameter | N/A | N/A | Array of tempURL => filename files to process |
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | ID of the member who initiated the mass import |
| $cat | ID_TEXT | No | No | required parameter | N/A | N/A | Gallery to import into |
| $set_title | string | No | No | required parameter | N/A | N/A | The title to prepend to every image/video |
| $allow_rating | integer | No | No | required parameter | N/A | N/A | Post param indicating whether or not ratings should be allowed |
| $allow_comments_reviews | integer | No | No | required parameter | N/A | N/A | Post param combination indicating whether to allow comments or reviews |
| $allow_trackbacks | integer | No | No | required parameter | N/A | N/A | Post param indicating whether or not to allow trackbacks |
| $watermark | boolean | No | No | required parameter | N/A | N/A | Whether or not to apply the gallery's watermarks to the file if it is an image |
| $notes | string | No | No | required parameter | N/A | N/A | Staff notes provided for this entry |
| $privacy_level | ID_TEXT | No | No | required parameter | N/A | N/A | Level of privacy set for this content |
| $additional_access | array | No | No | required parameter | N/A | N/A | Array of additional members who should have access to this content |
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 array $files Array of tempURL => filename files to process
* @param MEMBER $member_id ID of the member who initiated the mass import
* @param ID_TEXT $cat Gallery to import into
* @param string $set_title The title to prepend to every image/video
* @param integer $allow_rating Post param indicating whether or not ratings should be allowed
* @param integer $allow_comments_reviews Post param combination indicating whether to allow comments or reviews
* @param integer $allow_trackbacks Post param indicating whether or not to allow trackbacks
* @param boolean $watermark Whether or not to apply the gallery's watermarks to the file if it is an image
* @param string $notes Staff notes provided for this entry
* @param ID_TEXT $privacy_level Level of privacy set for this content
* @param array $additional_access Array of additional members who should have access to this content
* @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(array $files, int $member_id, string $cat, string $set_title, int $allow_rating, int $allow_comments_reviews, int $allow_trackbacks, bool $watermark, string $notes, string $privacy_level, array $additional_access) : ?array
* Run the task hook.
*
* @param array $files Array of tempURL => filename files to process
* @param MEMBER $member_id ID of the member who initiated the mass import
* @param ID_TEXT $cat Gallery to import into
* @param string $set_title The title to prepend to every image/video
* @param integer $allow_rating Post param indicating whether or not ratings should be allowed
* @param integer $allow_comments_reviews Post param combination indicating whether to allow comments or reviews
* @param integer $allow_trackbacks Post param indicating whether or not to allow trackbacks
* @param boolean $watermark Whether or not to apply the gallery's watermarks to the file if it is an image
* @param string $notes Staff notes provided for this entry
* @param ID_TEXT $privacy_level Level of privacy set for this content
* @param array $additional_access Array of additional members who should have access to this content
* @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(array $files, int $member_id, string $cat, string $set_title, int $allow_rating, int $allow_comments_reviews, int $allow_trackbacks, bool $watermark, string $notes, string $privacy_level, array $additional_access) : ?array

