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:
Mixin_PublicFeatured::isPublic()

Returns whether the record is public or not.

Returns:bool
Mixin_PublicFeatured::setPublic($flag)

Sets whether the record is public or not.

Parameters:
  • $flag (bool) – Whether the record is public or not
Mixin_PublicFeatured::isFeatured()

Returns whether the record is featured or not.

Returns:bool
Mixin_PublicFeatured::setFeatured($flag)

Sets whether the record is featured or not.

Parameters:
  • $flag (bool) – 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 (bool) –
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 (bool) –
Returns:

string The hook name