Function Hook_attachments_author->run
Definitions
sources/hooks/systems/attachments/author.php
- Run function for attachment hooks. They see if permission to an attachment of an ID relating to this content is present for a member.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | ID_TEXT | No | No | required parameter | N/A | N/A | The ID |
| $db | object | No | No | required parameter | N/A | N/A | The database connector to check on |
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member to check for |
Returns
- Whether there is permission
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Run function for attachment hooks. They see if permission to an attachment of an ID relating to this content is present for a member.
*
* @param ID_TEXT $id The ID
* @param object $db The database connector to check on
* @param MEMBER $member_id The member to check for
* @return boolean Whether there is permission
*/
public function run(string $id, object $db, int $member_id) : bool
* Run function for attachment hooks. They see if permission to an attachment of an ID relating to this content is present for a member.
*
* @param ID_TEXT $id The ID
* @param object $db The database connector to check on
* @param MEMBER $member_id The member to check for
* @return boolean Whether there is permission
*/
public function run(string $id, object $db, int $member_id) : bool

