Mixin_PublicFeatured¶
Package: Record\Mixin
- class Mixin_PublicFeatured¶
extends Omeka_Record_Mixin_AbstractMixin
Adds default behavior associated with the ‘public’ and ‘featured’ flags.
- Mixin_PublicFeatured::__construct($record)¶
Constructor
Parameters:
- $record (Omeka_Record_AbstractRecord) – The underlying record
- Mixin_PublicFeatured::isPublic()¶
Returns whether the record is public or not.
Returns: boolean
- Mixin_PublicFeatured::setPublic($flag)¶
Sets whether the record is public or not.
Parameters:
- $flag (boolean) – Whether the record is public or not
- Mixin_PublicFeatured::isFeatured()¶
Returns whether the record is featured or not.
Returns: boolean
- Mixin_PublicFeatured::setFeatured($flag)¶
Sets whether the record is featured or not.
Parameters:
- $flag (boolean) – Whether the record is featured or not
- Mixin_PublicFeatured::beforeSave($args)¶
Parameters:
- $args –
- Mixin_PublicFeatured::afterSave($args)¶
Parameters:
- $args –
- Mixin_PublicFeatured::_fireHook($state, $flag)¶
Fires a hooks like ‘make_item_public’, ‘make_collection_not_featured’, etc.
Parameters:
- $state (string) – Currently, ‘public’ or ‘featured’
- $flag (boolean) –
- Mixin_PublicFeatured::_getHookName($state, $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