Class BlockController

Description

The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.

Located in /libraries/block_controller.php (line 24)

Controller
   |
   --BlockController
Direct descendents
Class Description
 class AutonavBlockController The controller for the autonav block, which makes navigation lists and menus from C5 pages.
 class ContentBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class DateNavBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class ExternalFormBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class FileBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class FlashContentBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class FormBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class GoogleMapBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class GuestbookBlockController Controller for the guestbook block, which allows site owners to add comments onto any concrete page.
 class HtmlBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class ImageBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class NextPreviousBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class PageListBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class RssDisplayerBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class SearchBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class SlideshowBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class SurveyBlockController Controller for the survey block, which allows site owners to add surveys and uses Google's graphing web service to display results.
 class TagsBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class VideoBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
 class YoutubeBlockController The parent object of all individual block type controllers. Responsible for installing the block, saving its data, rendering its various templates.
Variable Summary
Method Summary
 BlockController __construct ([ $obj = null], BlockType $obj|Block)
 void addHeaderItem ( $file)
 $void delete ()
 BlockRecord duplicate ( $newBID, int $newBlockID)
 void field ( $fieldName)
 void get ( $key)
 string getBlockTypeName ()
 void getIdentifier ()
 void getSets ()
 bool includeAll ()
 bool install (string $path)
 void load ()
 void post ([ $field = false])
 void render (string $view)
 void save (array $args)
 void set (string $key, string $value)
 void setupAndRun ( $method)
 void uninstall ()
 void validate ( $args)
 void __wakeup ()
Variables
static mixed $sets (line 28)
  • access: protected
mixed $btActiveWhenAdded = 1 (line 34)
  • access: protected
mixed $btCacheBlockOutputLifetime = CACHE_LIFETIME (line 43)
  • access: protected

Redefined in descendants as:
mixed $btCopyWhenPropagate = 0 (line 35)
  • access: protected
mixed $btDescription = "" (line 30)
  • access: protected
mixed $btHandle = "" (line 32)
  • access: protected
mixed $btHasRendered = false (line 40)
  • access: protected
mixed $btIncludeAll = 0 (line 36)
  • access: protected

Redefined in descendants as:
mixed $btIsInternal = 0 (line 33)
  • access: protected
mixed $btName = "" (line 31)
  • access: protected
mixed $dbFile = 'db.xml' (line 37)
  • access: protected
mixed $headerItems = array() (line 46)
  • access: public
mixed $helpers = array('form') (line 27)
  • access: protected

Redefined in descendants as:
mixed $identifier (line 48)
  • access: protected
mixed $record (line 26)
  • access: protected

Inherited Variables

Inherited from Controller

Controller::$c
Controller::$helperObjects
Controller::$parameters
Controller::$task
Controller::$theme
Methods
Constructor __construct (line 245)

Instantiates the block controller.

  • access: public
BlockController __construct ([ $obj = null], BlockType $obj|Block)

Redefinition of:
Controller::__construct()

Redefined in descendants as:
addHeaderItem (line 280)
  • access: public
void addHeaderItem ( $file)
  • $file

Redefinition of:
Controller::addHeaderItem()
Adds an item to the view's header. This item will then be automatically printed out in the <head> section of the page
cacheBlockOutput (line 175)
  • access: public
void cacheBlockOutput ()
cacheBlockOutputForRegisteredUsers (line 179)
  • access: public
void cacheBlockOutputForRegisteredUsers ()
cacheBlockOutputOnPost (line 183)
  • access: public
void cacheBlockOutputOnPost ()
cacheBlockRecord (line 171)
  • access: public
void cacheBlockRecord ()
delete (line 220)

Automatically run when a block is deleted. This removes the special data from the block's specific database table. If a block needs to do more than this this method should be overridden.

  • access: public
$void delete ()

Redefined in descendants as:
duplicate (line 158)

Automatically run when a block is duplicated. This most likely happens when a block is edited: a block is first duplicated, and then presented to the user to make changes.

  • access: public
BlockRecord duplicate ( $newBID, int $newBlockID)
  • int $newBlockID
  • $newBID

Redefined in descendants as:
field (line 198)
  • access: public
void field ( $fieldName)
  • $fieldName
get (line 64)
  • access: public
void get ( $key)
  • $key

Redefinition of:
Controller::get()
If no arguments are passed, returns the GET array. If a key is passed, it returns the value as it exists in the GET array.
getBlockControllerData (line 123)
  • access: public
void getBlockControllerData ()
getBlockObject (line 310)

Gets the generic Block object attached to this controller's instance

  • access: public
Block getBlockObject ()
getBlockTypeCacheOutputLifetime (line 187)
  • access: public
void getBlockTypeCacheOutputLifetime ()
getBlockTypeDescription (line 350)

Returns the description of the block type

  • access: public
string getBlockTypeDescription ()

Redefined in descendants as:
getCollectionObject (line 191)
  • access: public
void getCollectionObject ()

Redefinition of:
Controller::getCollectionObject()
Gets the current controller's page object.
getIdentifier (line 50)
  • access: public
void getIdentifier ()
getInterfaceHeight (line 342)

Returns the height of the block type's interface when presented in page.

  • access: public
int getInterfaceHeight ()
getInterfaceWidth (line 334)

Returns the width of the block type's interface when presented in page.

  • access: public
int getInterfaceWidth ()
getPermissionsObject (line 148)

Gets the permissions object for this controller's block

  • access: public
void getPermissionsObject ()
getSets (line 75)
  • access: public
void getSets ()

Redefinition of:
Controller::getSets()
Gets the array of items that have been set using set()
includeAll (line 372)

Returns whether this block type is included in all versions. Default is false - block types are typically versioned but sometimes it makes sense not to do so.

  • access: public
bool includeAll ()
install (line 91)

Installs the current block's DB xml file. If a block needs to do more than this, this should be overridden.

  1.  public function install($path{
  2.      $this->doMySpecialInstallMethod();
  3.      $this->doSecondSpecialInstallMethod();
  4.      parent::install($path);
  5.  }

bool install (string $path)
  • string $path
isActiveWhenAdded (line 357)
  • access: public
void isActiveWhenAdded ()
isBlockTypeInternal (line 380)

Returns whether this block type is internal to Concrete. If it's internal it's not displayed in the front end interface. Examples include the LibraryFile block.

  • access: public
bool isBlockTypeInternal ()
isCopiedWhenPropagated (line 364)
  • access: public
void isCopiedWhenPropagated ()
load (line 232)

Loads the BlockRecord class based on its attribute names

  • access: protected
void load ()
outputAutoHeaderItems (line 268)
  • access: public
void outputAutoHeaderItems ()
post (line 202)
  • access: public
void post ([ $field = false])
  • $field

Redefinition of:
Controller::post()
If no arguments are passed, returns the post array. If a key is passed, it returns the value as it exists in the post array.
render (line 108)

Renders a view in the block's folder.

  1.  public function view(// The view() method is automatically run when a block is viewed
  2.      $this->render("other_special_view")// don't use .php
  3.  }

void render (string $view)
  • string $view

Redefinition of:
Controller::render()
Renders a view with the current controller as its controller
save (line 132)

Run when a block is added or edited. Automatically saves block data against the block's database table. If a block needs to do more than this (save to multiple tables, upload files, etc... it should override this.

  • access: public
void save (array $args)
  • array $args

Redefined in descendants as:
set (line 60)

Sets a value used by a particular block. These variables will automatically be present in the corresponding views used by the block.

  • access: public
void set (string $key, string $value)
  • string $key
  • string $value

Redefinition of:
Controller::set()
Sets a variable to be passed through from the controller to the view
setupAndRun (line 286)
  • access: public
void setupAndRun ( $method)
  • $method

Redefinition of:
Controller::setupAndRun()
Based on the current request, the Controller object is loaded with the parameters and task requested
uninstall (line 318)
  • todo: Make block's uninstallable
  • access: public
void uninstall ()
validate (line 119)
  • access: public
void validate ( $args)
  • $args

Redefined in descendants as:
__wakeup (line 167)
  • access: public
void __wakeup ()

Inherited Methods

Inherited From Controller

 Controller::__construct()
 Controller::addHeaderItem()
 Controller::externalRedirect()
 Controller::get()
 Controller::getCollectionObject()
 Controller::getHelperObjects()
 Controller::getRenderOverride()
 Controller::getSets()
 Controller::getTask()
 Controller::getvar()
 Controller::getView()
 Controller::isPost()
 Controller::isValidExternalUrl()
 Controller::on_before_render()
 Controller::on_start()
 Controller::outputHeaderItems()
 Controller::post()
 Controller::redirect()
 Controller::render()
 Controller::request()
 Controller::runTask()
 Controller::set()
 Controller::setCollectionObject()
 Controller::setupAndRun()

Documentation generated on Thu, 15 Sep 2011 16:36:18 -0700 by phpDocumentor 1.4.1