Mixin_PublicFeatured¶
- class Mixin_PublicFeatured¶
Package: Record\Mixin
Adds default behavior associated with the ‘public’ and ‘featured’ flags.
- property _wasPublic¶
- property _wasFeatured¶
- __construct(Omeka_Record_AbstractRecord $record)¶
Constructor
Parameters: - $record (Omeka_Record_AbstractRecord) – The underlying record
- isPublic()¶
Returns whether the record is public or not.
Returns: boolean
- setPublic(boolean $flag)¶
Sets whether the record is public or not.
Parameters: - $flag (boolean) – Whether the record is public or not
- isFeatured()¶
Returns whether the record is featured or not.
Returns: boolean
- setFeatured(boolean $flag)¶
Sets whether the record is featured or not.
Parameters: - $flag (boolean) – Whether the record is featured or not
- beforeSave($args)¶
Parameters: - $args (unknown) –
- afterSave($args)¶
Parameters: - $args (unknown) –
- _fireHook(string $state, boolean $flag)¶
Fires a hooks like ‘make_item_public’, ‘make_collection_not_featured’, etc.
Parameters: - $state (string) – Currently, ‘public’ or ‘featured’
- $flag (boolean) –
- _getHookName(string $state, boolean $flag)¶
Retrieve formatted hooks like ‘make_item_public’, ‘make_collection_not_featured’, etc.
Parameters: - $state (string) – Currently, ‘public’ or ‘featured’
- $flag (boolean) –
Returns: string The hook name