Item¶
- class Item¶
Package: Record
An item and its metadata.
- property item_type_id¶
- property collection_id¶
- property featured¶
- property public¶
- property added¶
- property modified¶
- property owner_id¶
- property _files¶
- _initializeMixins()¶
- getCollection()¶
Returns: null|Collection
- getItemType()¶
Retrieve the ItemType record associated with this Item.
Returns: ItemType|null
- getFiles()¶
Retrieve the set of File records associated with this Item.
Returns: array
- getItemTypeElements()¶
Retrieve a set of elements associated with the item type of the item.
Each one of the Element records that is retrieved should contain all theelement text values associated with it.
Returns: array Element records that are associated with the item type of the item. This array will be empty if the item does not have an associated type.
- getProperty(string $property)¶
Get a property for display.
Parameters: - $property (string) –
Returns: mixed
- beforeSave($args)¶
Parameters: - $args (unknown) –
- afterSave($args)¶
Logic for after the record has been saved.
Parameters: - $args (unknown) –
- _delete()¶
All of the custom code for deleting an item.
Returns: void
- _deleteFiles(array $fileIds = Array)¶
Delete files associated with the item.
If the IDs of specific files are passed in, this will delete only thosefiles (e.g. form submission). Otherwise, it will delete all filesassociated with the item.
Parameters: - $fileIds (array) – Optional
Returns: void
- _uploadFiles()¶
Iterate through the $_FILES array for files that have been uploaded to Omeka and attach each of those files to this Item.
Returns: void
- saveFiles()¶
Save all the files that have been associated with this item.
Returns: boolean
- filterPostData($post)¶
Filter post data from form submissions.
Parameters: - $post (unknown) –
Returns: array Clean post data
- fileCount()¶
Retrieve the number of files assigned to this item.
Returns: boolean
- previous()¶
Retrieve the previous Item in the database.
Returns: Item|false
- next()¶
Retrieve the next Item in the database.
Returns: Item|false
- hasThumbnail()¶
Determine whether or not the Item has a File with a thumbnail image (or any derivative image).
Returns: boolean
- getCitation()¶
Return a valid citation for this item.
Generally follows Chicago Manual of Style note format for webpages.Implementers can use the item_citation filter to return a customizedcitation.
Returns: string
- addFile(File $file)¶
Associate an unsaved (new) File record with this Item.
These File records will not be persisted in the database until the itemis saved or saveFiles() is invoked.
Parameters: - $file (File) –
Returns: void
- getResourceId()¶
Required by Zend_Acl_Resource_Interface.
Identifies Item records as relating to the Items ACL resource.
Returns: string