UNA
Loading...
Searching...
No Matches
BxDolWiki Class Reference
Inheritance diagram for BxDolWiki:
BxDolFactory iBxDolFactoryObject

Public Member Functions

 getObjectName ()
 getUri ()
 getBlockContent ($iBlockId, $sLang=false, $iRevision=false)
 getContents ($sAllExceptSpecified='', $sOnlySpecified='')
 getMissingTranslations ($sLang=false)
 getOutdatedTranslations ($sLang=false)
 isAllowed ($sType, $iProfileId=false)
 addPage ($sPageUri, $sTitleLangKey)
 actionGetTranslation ()
 actionDeleteVersion ()
 actionAddPage ()
 actionAdd ()
 actionDeleteBlock ()
 actionHistory ()
 actionTranslate ()
 actionEdit ($bTranslate=false)
 actionConvertLinks ()
 updateBlockIndexingData ($iBlockId)
 getVarsForHistory ($iBlockId, $sLang)

Static Public Member Functions

static getObjectInstanceByUri ($sUri, $oTemplate=false)
static getObjectInstance ($sObject, $oTemplate=false)
static onModuleUninstall ($sModule)
static onBlockDelete ($mixedBlockIds)
Static Public Member Functions inherited from iBxDolFactoryObject
static getObjectInstance ($sObject)

Protected Member Functions

 __construct ($aObject)
 getPageUrl ($sPageUri, $bPermalink=true, $bAddRootUrl=true)
 isContentChanged ($iBlockId, $sLang, $sContent)
 getFieldRev ($oForm, $sLang, $aWikiVer)
 getFieldMainLangFlag ($oForm, $sLang, $aWikiVer)
 getFieldUnsafeFlag ($oForm, $sLang, $aWikiVer)
 getLangsForInput ($iBlockId, $bTranslateForm, &$sMainLangLabel, &$aWikiVerMain, &$sLangForTranslate)

Protected Attributes

 $_sObject
 $_aObject
 $_oQuery
 $_sLangCateg = 'Wiki'
 $_sACLprefix = 'wiki '
 $_bProcessMarkdown = true

Detailed Description

WIKI object.

It's possble to create different WIKI object which will different URLs, Menus and permissions. For example it's possible to create http://example.com/wiki/somepageshere and http://example.com/docs/anotherpageshere

Creating the WIKI object:

Add record to 'sys_objects_wiki' table:

  • object: name of the WIKI object, this name will be user in URL as well, for example, 'wiki' will have URLs like this: http://example.com/wiki/somepageshere
  • uri: wiki module URI
  • title: title of the WIKI, for example, documentation, help, tutorial
  • module: module name WIKI object belongs to
  • override_class_name: user defined class name
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Add record to 'sys_rewrite_rules' table:

  • preg - regular expression which matches some URL
  • service - service method to call if abbe regular expression matches
  • active - active flag

Add record to 'sys_permalinks' table:

  • standard - how link should look like when permalinks are off
  • permalink - how link should look like when permalinks are on, some special server configuration may be required to make permalink to work, such as 'mod_rewrite' and .htaccess file for Apache
  • check - option name which enables/disables permalinks
  • compare_by_prefix - compare by prefix

Constructor & Destructor Documentation

◆ __construct()

BxDolWiki::__construct ( $aObject)
protected

Constructor

Parameters
$aObjectarray of WIKI options

Member Function Documentation

◆ getBlockContent()

BxDolWiki::getBlockContent ( $iBlockId,
$sLang = false,
$iRevision = false )

Get WIKI block content

Parameters
$iBlockIdblock ID
$sLangoptional language name
Returns
block content

◆ getContents()

BxDolWiki::getContents ( $sAllExceptSpecified = '',
$sOnlySpecified = '' )

Generate wiki contents - list of all wiki pages

◆ getMissingTranslations()

BxDolWiki::getMissingTranslations ( $sLang = false)

Generate list of wiki blocks with missing translations for the given language

◆ getObjectInstance()

BxDolWiki::getObjectInstance ( $sObject,
$oTemplate = false )
static

Get WIKI object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

◆ getObjectInstanceByUri()

BxDolWiki::getObjectInstanceByUri ( $sUri,
$oTemplate = false )
static

Get WIKI object instance by object URI

Parameters
$sObjectobject name
Returns
object instance or false on error

◆ getObjectName()

BxDolWiki::getObjectName ( )

Get object name

◆ getOutdatedTranslations()

BxDolWiki::getOutdatedTranslations ( $sLang = false)

Generate list of wiki blocks with outdated translations for the given language

◆ getUri()

BxDolWiki::getUri ( )

Get URI

◆ isAllowed()

BxDolWiki::isAllowed ( $sType,
$iProfileId = false )

Check if partucular action is allowed

Parameters
$sTypeaction type: add, edit, delete, translate
$sProfileIdprofile to check, if not provided then current profile is used
Returns
true if action is allowed, false otherwise

The documentation for this class was generated from the following file:
  • inc/classes/BxDolWiki.php