Package: Record\Mixin
Make an Omeka record fulltext searchable.
Any class that extends Omeka_Record_AbstractRecord can be made searchable bypushing an instance of this mixin into Omeka_Record::$_mixins duringOmeka_Record::_initializeMixins(). It must be pushed after all mixins thatcan add search text–for example, after ElementText.
The record type must also be registered using the search_record_types filter in order for the records to be searchable.
This mixin leverages the Omeka_Record_AbstractRecord::afterSave() andOmeka_Record_Mixin_AbstractMixin::afterSave() callbacks, so note their orderof execution. Records that initialize ActsAsElementText will automaticallyadd their element texts to the search text.
Parameters: |
|
---|
Add search text to this record.
This method is meant to be called during afterSave().
Parameters: |
|
---|
Add a title to this record.
This method is meant to be called during afterSave().
Parameters: |
|
---|
Mark this record’s search text as not public.
This method is meant to be called during afterSave().
Save the accumulated search text to the database.
Parameters: |
|
---|
Delete this record’s search text after it has been deleted.
Save a search text row.
Call this statically only when necessary. Used primarily when in a recordthat does not implement Mixin_Search but contains text that is needed foranother record’s search text. For example, when saving a child recordthat contains search text that should be saved to its parent record.
Parameters: |
|
---|