Function __global->save_privacy_form_fields
Definitions
sources/content_privacy2.php
- Actualise form data for setting content privacy.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $content_type | ID_TEXT | No | No | required parameter | N/A | N/A | The content type |
| $content_id | ?ID_TEXT | No | No | required parameter | N/A | N/A | The content ID (null: adding) |
| $privacy_level | ID_TEXT | No | No | required parameter | members friends staff guests | N/A | The privacy level |
| $additional_access | array | No | No | required parameter | N/A | N/A | A list of usernames |
| $send_invites | boolean | No | No | True | N/A | N/A | Whether to send out invite notifications (only do this is it is a new content entry, rather than something obscure, like a member's photo) |
Returns
- Whether it saved something
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Actualise form data for setting content privacy.
*
* @param ID_TEXT $content_type The content type
* @param ?ID_TEXT $content_id The content ID (null: adding)
* @param ID_TEXT $privacy_level The privacy level
* @set members friends staff guests
* @param array $additional_access A list of usernames
* @param boolean $send_invites Whether to send out invite notifications (only do this is it is a new content entry, rather than something obscure, like a member's photo)
* @return boolean Whether it saved something
*/
function save_privacy_form_fields(string $content_type, ?string $content_id, string $privacy_level, array $additional_access, bool $send_invites = true) : bool
* Actualise form data for setting content privacy.
*
* @param ID_TEXT $content_type The content type
* @param ?ID_TEXT $content_id The content ID (null: adding)
* @param ID_TEXT $privacy_level The privacy level
* @set members friends staff guests
* @param array $additional_access A list of usernames
* @param boolean $send_invites Whether to send out invite notifications (only do this is it is a new content entry, rather than something obscure, like a member's photo)
* @return boolean Whether it saved something
*/
function save_privacy_form_fields(string $content_type, ?string $content_id, string $privacy_level, array $additional_access, bool $send_invites = true) : bool

