array addField(
string
$newField, string
$set, [int
$containerId = 0]
)
|
|
Add new custom field in given set/container.
Parameters:
|
string |
$newField: |
field name |
|
string |
$set: |
(common, album, photo) |
|
int |
$containerId: |
id of container; to save album-specific settings |
API Tags:
| Return: | GalleryStatus a status code boolean true on success, false on duplicate field name |
void createCustomFields(
$fieldNames, [
$containerId = 0]
)
|
|
Parameters:
|
|
$fieldNames: |
|
|
|
$containerId: |
|
API Tags:
| See: | CustomFieldInterface_1_0::createCustomFields |
Redefinition of:
- CustomFieldInterface_1_0::createCustomFields()
- Create new custom fields
GalleryStatus deleteField(
string
$field, [int
$containerId = 0], [string
$exceptType = '']
)
|
|
Delete custom field values for given field
Parameters:
|
string |
$field: |
field to delete |
|
int |
$containerId: |
id of container, to delete only for specific album |
|
string |
$exceptType: |
'album' or 'photo' -- don't delete values for items of this type |
API Tags:
array fetchFieldValues(
array
$items, [string
$viewType = null], [string
$fillSet = null]
)
|
|
Load custom field values for specified items
Parameters:
|
array |
$items: |
GalleryEntity item, ... |
|
string |
$viewType: |
if given then only include fields for that view (summary or detail) |
|
string |
$fillSet: |
if given then include in results all valid fields for this type, even if item has no value |
API Tags:
| Return: | GalleryStatus a status code array(itemId => array(field => value)) array(itemId => array) loadParameters results array(itemId => boolean) loadParameters results |
int findParameter(
&$list, string
$field, array
$list
)
|
|
Find a field in a parameter list
Parameters:
|
array |
$list: |
parameter list |
|
string |
$field: |
field to find |
|
|
&$list: |
|
API Tags:
| Return: | index or -1 if not found |
array handleAdminAction(
array
$form, [int
$containerId = 0]
)
|
|
Handler for Custom Field Admin actions
Parameters:
|
array |
$form: |
form data |
|
int |
$containerId: |
id of container, for album-specific settings |
API Tags:
| Return: | GalleryStatus a status code mixed status to return from controller |
void handleEvent(
$event
)
|
|
Event handler for GalleryEntity::delete event Remove any custom field values for entity being deleted.
Parameters:
API Tags:
| See: | GalleryEventListener::handleEvent |
GalleryStatus loadAdminForm(
&$form, [int
$containerId = 0], array
$form
)
|
|
Load form data for Admin template
Parameters:
|
array |
$form: |
form |
|
int |
$containerId: |
id of container, for album-specific settings |
|
|
&$form: |
|
API Tags:
array loadParameters(
[int
$containerId = 0], [boolean
$fallback = true], [array
$sets = array('common', 'album', 'photo')]
)
|
|
Load and decode module parameters
Parameters:
|
int |
$containerId: |
id of container; check for album-specific settings |
|
boolean |
$fallback: |
fallback to site-defaults if no album-specific settings found |
|
array |
$sets: |
sets to load; all by default |
API Tags:
| Return: | GalleryStatus a status code mixed containing custom field data boolean true if album-specific settings are returned |
Save custom field values for specified item, overwriting any existing values
Parameters:
API Tags:
GalleryStatus saveParameters(
array
$param, [int
$containerId = 0]
)
|
|
Encode and save module parameters
Parameters:
|
array |
$param: |
data to save |
|
int |
$containerId: |
id of container; to save album-specific settings |
API Tags:
void setCustomFieldValues(
$itemId,
$data
)
|
|
Parameters:
API Tags:
| See: | CustomFieldInterface_1_0::setCustomFieldValues |
Redefinition of:
- CustomFieldInterface_1_0::setCustomFieldValues()
- Set custom field values for an item; overwrites all existing field values.