Sample class to illustrate best practices when creating a new bitweaver package that builds on core bitweaver functionality, such as the Liberty CMS engine
Not-so-pure virtual function that returns Request_URI to a content's thumbnail representation. It is up to the derived content what exactly this means If not implemented in the content's class, this class will return NULL, which is an acceptable case meaning no thumbnail is available.
Determines if a wiki page (row in wiki_pages) exists, and returns a hash of important info. If N pages exists with $pPageName, returned existsHash has a row for each unique pPageName row.
This is a generic liberty content function to gather indexable words. Override this function in your BitPackage.php file if you need to add more indexable words from files other than tiki_content and users_users.
Set a hash value in the mPrefs hash. This does *NOT* store the value in the database. It does no checking for existing or duplicate values. the main point of this function is to limit direct accessing of the mPrefs hash. I will probably make mPrefs private one day.
Saves a preference to the liberty_content_prefs database table with the given pref name and value. If the value is NULL, the existing value will be delete and the value will not be saved. However, a zero will be stored. This will update the mPrefs hash.
verify the data in the action log is ready for storing First checks $pParamHash['action_log'] for information and then the content_store stuff Note: use $gBitSystem throughout that this function can be called statically if needed
fully load content and insert any attachments in $this->mStorage allow an optional content_id to be passed in to ease legacy lib style objects (like blogs, articles, etc.)
Tags:
return:
on success, FALSE on failure - mErrors will contain reason for failure
This is the ONLY method that should be called in order to store (create or update) a wiki page! It is very smart and will figure out what to do for you. It should be considered a black box.