Class acContentBlockBase

Description

Class definition and methods for AdvancedContent contentblock types.
All block types needs to inherit and extend this class!

  • author: Georg Busch (NaN)
  • copyright: 2010-2012 Georg Busch (NaN)
  • since: 0.9
  • license: GPL

Located in /class.acContentBlockBase.php (line 13)


	
			
Variable Summary
object - $content_obj
Method Summary
acContentBlockBase __construct (object &$content_obj, [ &$params = array()], array $params)
string FillBlockParams (array &$params, [bool $editing = false])
string GetBlockInput ()
mixed GetBlockProperty (string $name, [string $default = ''])
array GetBlockTypeProperties ([ $access = 'backend'])
string GetChangeLog ()
string GetHeaderHTML ()
string GetHelp ()
void SetBlockProperty (string $name, [string $value = ''])
string ShowBlock ()
Variables
object - $content_obj (line 24)
  • var: the content object instance that creates the contentblock
  • access: protected
Methods
Constructor __construct (line 33)

Constructor.
Required for all subclasses.
Should be called from each subclass as the very first.

acContentBlockBase __construct (object &$content_obj, [ &$params = array()], array $params)
  • object &$content_obj: - the content object instance that creates the contentblock
  • array $params: - the parameters of that contentblock
  • &$params
FillBlockParams (line 167)

Function for the subclass to parse out data for it's parameters.
Needs to be overwritten if the blocktype provides a special kind of data that needs to be processed before storing it.

  • access: public
string FillBlockParams (array &$params, [bool $editing = false])
  • array &$params: - the parameters that are passed when the form is submitted
  • bool $editing: - a flag to determine if the page is created or edited
GetBlockInput (line 124)

Gets the html output of the block in backend.
This method is required and needs to be overwritten.

  • access: public
string GetBlockInput ()
GetBlockProperties (line 105)

Returns all valid properties of that block.

  • return: - array(propname => propvalue)
  • access: public
array GetBlockProperties ()
GetBlockProperty (line 91)

Returns the value of a property.

  • return: - usually this will be a string
  • access: public
mixed GetBlockProperty (string $name, [string $default = ''])
  • string $name: - the name of the property
  • string $default: - the default value of the property if not exists
GetBlockTypeProperties (line 114)

Defines additional properties of the blocktype that needs to be stored "outside" the block.

  • return: - array(propname => propvalue)
  • access: public
array GetBlockTypeProperties ([ $access = 'backend'])
  • $access
GetChangeLog (line 155)

Displays the changelog text for this blocktype.
Changelog will be displayed in modules changelog.

  • access: public
string GetChangeLog ()
GetHeaderHTML (line 135)

Gets the html that needs to be inserted in the head section for this blocktype when editing a page.
Can be useful to add css or js.

  • access: public
string GetHeaderHTML ()
GetHelp (line 145)

Displays the help text for this blocktype.
Helptext will be displayed in modulehelp.

  • access: public
string GetHelp ()
SetBlockProperty (line 80)

Sets the value of a property. If not exists it will be created.

  • access: public
void SetBlockProperty (string $name, [string $value = ''])
  • string $name: - the name of the property
  • string $value: - the value of the property
ShowBlock (line 177)

Function for the subclass to perform the blocks output
Needs to be overwritten if the blocktype provides a special kind of data that needs to be processed before displaying it in frontend.

  • access: public
string ShowBlock ()

Documentation generated on Thu, 06 Oct 2011 20:54:40 +0200 by phpDocumentor 1.4.1