wiki
[ class tree: wiki ] [ index: wiki ] [ all elements ]

Class: BitPage

Source Location: /wiki/BitPage.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyContent
         |
         --LibertyMime
            |
            --BitPage



Variables

Methods


Child classes:

BitBook
BitBook class

Inherited Constants

Inherited Variables

Inherited Methods

Class: LibertyMime

LibertyMime::addDownloadHit()
Increment the item hit flag by 1
LibertyMime::getThumbnailUrl()
getThumbnailUrl will fetch the primary thumbnail for a given content. If nothing has been set, it will fetch the last thumbnail it can find.
LibertyMime::load()
load the attachments for a given content id and then stuff them in mStorage
LibertyMime::pluginStore()
pluginStore will use a given plugin to store uploaded file data
LibertyMime::store()
Store a new upload
LibertyMime::updateAttachmentParams()
updateAttachmentParams will update attachment parameters
LibertyMime::verify()
Verify content that is about to be stored
LibertyMime::verifyAttachment()
verifyAttachment will perform a generic check if a file is valid for processing

Class: LibertyContent

LibertyContent::__construct()
Construct an empty LibertyBase object with a blank permissions array
LibertyContent::addHit()
Increment the content item hit flag by 1
LibertyContent::checkContentPermission()
Check is a user has permission to access the object
LibertyContent::convertQueryHash()
Convert a built up pQueryHash into a single query string and set of bind variables.
LibertyContent::exportHash()
Create an export hash from the data
LibertyContent::exportList()
LibertyContent::expunge()
Delete content object and all related records
LibertyContent::expungeComments()
Delete comment entries relating to the content object
LibertyContent::expungeContentPermissions()
Expunge Content Permissions
LibertyContent::expungeVersion()
Removes a specific version of a page
LibertyContent::generateDescription()
Attempt to create a brief description of this object, most useful for <meta name="description" />
LibertyContent::generateKeywords()
Attempt to create a collection of relevant words about this object, most useful for <meta name="keywords" />
LibertyContent::getAliases()
Get array of aliases for this content object
LibertyContent::getCacheKey()
LibertyContent::getContentDescription()
Return content type description for this content object.
LibertyContent::getContentId()
Access a content item content_id
LibertyContent::getContentListPermissionsSql()
getContentListPermissionsSql
LibertyContent::getContentPermissionsList()
Load all permissions assigned to a given object.
LibertyContent::getContentPermissionsSql()
getContentPermissionsSql
LibertyContent::getContentType()
Access a content item type GUID
LibertyContent::getContentTypeDescription()
getContentTypeDescription
LibertyContent::getContentTypeName()
Get the display name of the content type
LibertyContent::getContentWithPermissionsList()
Get a list of content with permissions
LibertyContent::getDisplayLink()
Pure virtual function that returns link to display a piece of content
LibertyContent::getDisplayUri()
Not-so-pure virtual function that returns fully qualified URI to a piece of content
LibertyContent::getDisplayUriFromHash()
Not-so-pure virtual function that returns fully qualified URI to a piece of content
LibertyContent::getDisplayUrlFromHash()
Not-so-pure virtual function that returns Request_URI to a piece of content
LibertyContent::getHistory()
Get complete set of historical data in order to display a given wiki page version
LibertyContent::getHistoryCount()
Get count of the number of historic records for the page
LibertyContent::getHits()
Get Hits and Last Hit
LibertyContent::getLibertySql()
Default liberty sql for joining a content object table to liberty.
LibertyContent::getPreference()
Returns the content preferences value for the passed in key.
LibertyContent::getRenderFile()
Pure virtual function that returns the include file that should render a page of content of this type
LibertyContent::getServicesSql()
Set up SQL strings for services used by the object
LibertyContent::getServicesSql2()
getServicesSql2
LibertyContent::getTitle()
Create the generic title for a content item
LibertyContent::getTitleFromHash()
Create the generic title for a content item
LibertyContent::getUserPermissions()
Get specific permissions for the specified user for this content
LibertyContent::getViewTemplate()
returns a path to the template type requested this is intended for package override. while not a requirement please use a naming convention of center_<action>_<content_type_guid>.tpl for new tpls
LibertyContent::hasAdminPermission()
Determine if current user has the ability to administer this type of content
LibertyContent::hasCreatePermission()
Determine if current user has the ability to craete this type of content
LibertyContent::hasEditPermission()
Deprecated, use hasUpdatePermission
LibertyContent::hasExpungePermission()
Determine if current user has the ability to delete/expunge this type of content
LibertyContent::hasPostCommentsPermission()
Determine if current user has the ability to post comments to this type of content
LibertyContent::hasService()
check if a service is active for this content type
LibertyContent::hasUpdatePermission()
Determine if current user has the ability to edit this type of content
LibertyContent::hasUserPermission()
Function that determines if this content specified permission for the current gBitUser.
LibertyContent::hasUserPermissions()
Check to see if the loaded content has individually assigned permissions
LibertyContent::hasViewPermission()
Determine if current user has the ability to view this type of content Note that this will always return TRUE if you haven't set the mViewContentPerm in your class
LibertyContent::invokeServices()
Set up access to services used by the object
LibertyContent::isAdminable()
Check permissions to establish if user has permission to admin the object
LibertyContent::isCacheableClass()
LibertyContent::isCacheableObject()
LibertyContent::isContentType()
Check if content matches content type GUID - must also be a valid content object, it will not work for generic content class
LibertyContent::isEditable()
Check permissions to establish if user has permission to edit the object
LibertyContent::isExcludedPermission()
Check to see if this permission is already in the global permissions table.
LibertyContent::isOwner()
Check user_id to establish if the object that has been loaded was created by the current user
LibertyContent::isServiceRequired()
check if a service is required for this content type
LibertyContent::isValid()
Check mContentId to establish if the object has been loaded with a valid record
LibertyContent::isViewable()
Check permissions to establish if user has permission to view the object
LibertyContent::load()
load Assume a derived class has joined on the liberty_content table, and loaded it's columns already.
LibertyContent::loadPreferences()
loadPreferences of the currently loaded object or pass in to get preferences of a specific content_id
LibertyContent::registerContentType()
Register the content type for reference
LibertyContent::removeLastVersion()
Removes last version of the page (from pages) if theres some version in the liberty_content_history then the last version becomes the actual version
LibertyContent::removePermission()
Remove a permission to access the content
LibertyContent::rollbackVersion()
Roll back to a specific version of a page
LibertyContent::setHits()
Set Hits and Last Hit
LibertyContent::setPreference()
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.
LibertyContent::store()
Create a new content object or update an existing one
LibertyContent::storeAliases()
storeAliases will store aliases to a given content item
LibertyContent::storeHistory()
storeHistory will store the previous data into the history table for reference
LibertyContent::storePermission()
Store a permission for the object that has been loaded in the permission database
LibertyContent::storePreference()
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.
LibertyContent::verify()
Verify the core class data required to update the liberty_content table entries
LibertyContent::verifyAccessControl()
Check permissions to establish if user has permission to access the object
LibertyContent::verifyAdminPermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
LibertyContent::verifyCreatePermission()
Determine if current user has the ability to create this type of content Note this will always return FALSEif the content isValid
LibertyContent::verifyEditPermission()
Deprecated, use verifyUpdatePermission
LibertyContent::verifyExpungePermission()
It will verify if a given user has a given $permission and if not, it will display the error template and die()
LibertyContent::verifyPostCommentsPermission()
It will verify if a given user has a given $permission and if not, it will display the error template and die()
LibertyContent::verifyUpdatePermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
LibertyContent::verifyUserPermission()
Function that determines if this content specified permission for the current gBitUser, and will throw a fatal error if not.
LibertyContent::verifyViewPermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.

Class: LibertyBase

LibertyBase::__construct()
Constructor building on BitBase object
LibertyBase::getLibertyClass()
given a content_type_guid this will return an object of the proper type
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type
LibertyBase::getNewObject()
Simple method to create a given class with a specified content_id. The purpose of a method is to allow for derived classes to override as necessary.
LibertyBase::getNewObjectById()
Simple method to create a given class with a specified primary_id. The purpose of a method is to allow for derived classes to override as necessary.

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::__construct()
BitBase::clearFromCache()
BitBase::expunge()
Delete content object and all related records
BitBase::load()
BitBase::__destruct()

Class Details

[line 21]


[ Top ]


Class Variables

$mPageId =

[line 22]


Type:   mixed


[ Top ]

$mPageName =

[line 23]


Type:   mixed


[ Top ]



Class Methods


static method findContentIdByPageId [line 46]

static void findContentIdByPageId( $pPageId)



Tags:

access:  public


Parameters:

   $pPageId  

[ Top ]

static method getDisplayUrlFromHash [line 460]

static the getDisplayUrlFromHash( pExistsHash &$pParamHash)

Generates the URL to this wiki page



Tags:

return:  link to display the page.
access:  public


Overrides LibertyContent::getDisplayUrlFromHash() (Not-so-pure virtual function that returns Request_URI to a piece of content)

Parameters:

pExistsHash   &$pParamHash   the hash that was returned by LibertyContent::pageExists

[ Top ]

static method getPageLink [line 482]

static the getPageLink( [pExistsHash $pLinkText = NULL], [ $pMixed = NULL], [ $pAnchor = NULL])

Returns HTML link to display a page if it exists, or to create if not



Tags:

return:  link to display the page.
access:  public


Parameters:

pExistsHash   $pLinkText   the hash that was returned by LibertyContent::pageExists
   $pMixed  
   $pAnchor  

[ Top ]

static method pageExists [line 72]

static void pageExists( pPageName $pPageName, [pCaseSensitive $pCaseSensitive = FALSE], [pContentId $pContentId = NULL])

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.



Tags:

access:  public


Parameters:

pPageName   $pPageName   name of the wiki page
pCaseSensitive   $pCaseSensitive   look for case sensitive names
pContentId   $pContentId   if you insert the content id of the currently viewed content, non-existing links can be created immediately

[ Top ]

constructor BitPage [line 25]

BitPage BitPage( [ $pPageId = NULL], [ $pContentId = NULL])



Parameters:

   $pPageId  
   $pContentId  

[ Top ]

method countSubPages [line 786]

void countSubPages( $pData)



Parameters:

   $pData  

[ Top ]

method expunge [line 316]

void expunge( )

Remove page from database



Overrides LibertyContent::expunge() (Delete content object and all related records)

[ Top ]

method expungeFootnote [line 401]

void expungeFootnote( $pUserId)

Delete footnote



Parameters:

   $pUserId  

[ Top ]

method findByPageName [line 55]

void findByPageName( $pPageName, [ $pUserId = NULL])



Parameters:

   $pPageName  
   $pUserId  

[ Top ]

method getBacklinks [line 517]

hash getBacklinks( )

Returns content_id's that link to this page



Tags:

return:  of content


[ Top ]

method getFootnote [line 411]

void getFootnote( $pUserId)

Get footnote



Parameters:

   $pUserId  

[ Top ]

method getLikePages [line 816]

boolean getLikePages( array $pPageTitle)

getLikePages Like pages are pages that share a word in common with the current page



Tags:

return:  TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure
access:  public


Parameters:

array   $pPageTitle  

[ Top ]

method getLinkStructure [line 962]

boolean getLinkStructure( array $pPageName, [float $pLevel = 0])

getLinkStructure



Tags:

return:  TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure
access:  public


Parameters:

array   $pPageName  
float   $pLevel  

[ Top ]

method getList [line 561]

array getList( &$pListHash, array $pListHash, boolean $pListHash['orphans_only'], boolean $pListHash['extras'], boolean $pListHash['get_data'], string $pListHash['find_title'], string $pListHash['find_author'], string $pListHash['find_last_editor'])

getList



Tags:

return:  of wiki pages
access:  public


Overridden in child classes as:

BitBook::getList()

Parameters:

array   $pListHash   array of list parameters
boolean   $pListHash['orphans_only']   only return orphan wiki pages
boolean   $pListHash['extras']   load extra infrmation such as backlinks and links
boolean   $pListHash['get_data']   return the wiki page data along with the listed information
string   $pListHash['find_title']   filter by the page title
string   $pListHash['find_author']   filter by the login name of the page author
string   $pListHash['find_last_editor']   filter by the login name of the last editor of the page
   &$pListHash  

[ Top ]

method getListLink [line 424]

the getListLink( $pParamHash)

Generates a link to a wiki page within lists of pages



Tags:

return:  link to display the page.


Parameters:

   $pParamHash  

[ Top ]

method getRenderFile [line 433]

the getRenderFile( )

Returns include file that will



Tags:

return:  fully specified path to file to be included


Overrides LibertyContent::getRenderFile() (Pure virtual function that returns the include file that should render a page of content of this type)

[ Top ]

method getStats [line 850]

boolean getStats( )

getStats getStats is always used by the stats package to display various stats of your package.



Tags:

return:  TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure
access:  public


Overridden in child classes as:

BitBook::getStats()

[ Top ]

method getSubPage [line 798]

string getSubPage( array $pData, array $pPageNumber)

getSubPage



Tags:

return:  SubPage
access:  public


Parameters:

array   $pData  
array   $pPageNumber  

[ Top ]

method getViewTemplate [line 441]

void getViewTemplate( $pAction)

Returns the center template for the view selected



Overrides LibertyContent::getViewTemplate() (returns a path to the template type requested this is intended for package override. while not a requirement please use a naming convention of center_<action>_<content_type_guid>.tpl for new tpls)

Parameters:

   $pAction  

[ Top ]

method isCommentable [line 356]

void isCommentable( )



[ Top ]

method isLocked [line 345]

void isLocked( )



[ Top ]

method isUserPage [line 333]

void isUserPage( )



[ Top ]

method isValid [line 341]

void isValid( )



Overrides LibertyContent::isValid() (Check mContentId to establish if the object has been loaded with a valid record)

[ Top ]

method linkStructureGraph [line 922]

boolean linkStructureGraph( [array $pLinkStructure = array()], [array $pParams = array()], &$pGraphViz, array $pGraphViz)

linkStructureGraph



Tags:

return:  TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure
access:  public


Parameters:

array   $pLinkStructure  
array   $pParams  
array   $pGraphViz  
   &$pGraphViz  

[ Top ]

method linkStructureMap [line 946]

boolean linkStructureMap( array $pPageName, [int $pLevel = 0], [array $pParams = array()])

linkStructureMap



Tags:

return:  TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure
access:  public


Parameters:

array   $pPageName  
int   $pLevel  
array   $pParams  

[ Top ]

method load [line 105]

TRUE load( [ $pContentId = NULL], [ $pPluginParams = TRUE])

load



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Overrides LibertyMime::load() (load the attachments for a given content id and then stuff them in mStorage)

Parameters:

   $pContentId  
   $pPluginParams  

[ Top ]

method lock [line 377]

void lock( [ $pModUserId = NULL])



Parameters:

   $pModUserId  

[ Top ]

method rollbackVersion [line 535]

TRUE rollbackVersion( pVersion $pVersion, [comment $comment = ''])

Roll back to a specific version of a page



Tags:

return:  if completed successfully


Overrides LibertyContent::rollbackVersion() (Roll back to a specific version of a page)

Parameters:

pVersion   $pVersion   Version number to roll back to
comment   $comment   Comment text to be added to the action log

[ Top ]

method setLock [line 361]

void setLock( $pLock, [ $pModUserId = NULL])



Parameters:

   $pLock  
   $pModUserId  

[ Top ]

method store [line 163]

bool store( array &$pParamHash)

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.



Tags:

return:  TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why
access:  public


Overrides LibertyMime::store() (Store a new upload)

Parameters:

array   &$pParamHash   pParams hash of values that will be used to store the page

[ Top ]

method storeFootnote [line 389]

void storeFootnote( $pUserId, $pData)

Store footnote



Parameters:

   $pUserId  
   $pData  

[ Top ]

method unlock [line 381]

void unlock( [ $pModUserId = NULL])



Parameters:

   $pModUserId  

[ Top ]

method update [line 757]

void update( $pHashOld, $pHashNew)



Parameters:

   $pHashOld  
   $pHashNew  

[ Top ]


Documentation generated on Wed, 29 Jul 2015 13:55:57 +0000 by phpDocumentor 1.5.0-lsces