## Class TScaffoldBase

Description

Base class for Active Record scaffold views.

Provides common properties for all scaffold views (such as, TScaffoldListView, TScaffoldEditView, TScaffoldListView and TScaffoldView).

During the OnPrRender stage the default css style file (filename style.css) is published and registered. To override the default style, provide your own stylesheet file explicitly.

- abstract:
- since: 3.1
- version: $Id: TScaffoldBase.php 2275 2007-09-30 00:49:07Z xue $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/ActiveRecord/Scaffold/TScaffoldBase.php (line 33)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TCompositeControl
                |
                --TTemplateControl
                   |
                   --TScaffoldBase

Direct descendents

Class | Description
--- | ---
TScaffoldEditView | Template control for editing an Active Record instance.
TScaffoldListView | TScaffoldListView displays a list of Active Records.
TScaffoldSearch | TScaffoldSearch provide a simple textbox and a button that is used to perform search on a TScaffoldListView with ID given by setListViewID.
TScaffoldView | TScaffoldView is a composite control consisting of TScaffoldListView

Method Summary
void clearRecordObject ()
void copyFrom (TScaffoldBase $obj)
string getDefaultStyle ()
boolean getEnableDefaultStyle ()
string getRecordClass ()
TActiveRecord getRecordFinder ()
TActiveRecord getRecordObject ([array $pk = null])
array getRecordPkValues (TActiveRecord $record)
array getRecordPropertyValues (TActiveRecord $record)
TDbMetaData getTableInfo ()
void onPreRender (mixed $param)
void setDefaultStyle (string $value)
void setEnableDefaultStyle (boolean $value)
void setRecordClass (string $value)
void setRecordObject (TActiveRecord $value)
Methods
clearRecordObject (line 108)

Unset the current record instance and table information.

- access: protected

void clearRecordObject ()
copyFrom (line 98)

Copy the view details from another scaffold view instance.

- access: protected

void copyFrom (TScaffoldBase $obj)

- TScaffoldBase $obj: scaffold view.

getDefaultStyle (line 164)

- return: default scaffold stylesheet name
- access: public

string getDefaultStyle ()
getEnableDefaultStyle (line 180)

- return: enable default stylesheet, default is true.
- access: public

boolean getEnableDefaultStyle ()
getRecordClass (line 80)

Name of the Active Record class to be viewed or scaffolded.

- return: Active Record class name.
- access: public

string getRecordClass ()
getRecordFinder (line 156)

- return: Active Record finder instance
- access: protected

TActiveRecord getRecordFinder ()
getRecordObject (line 119)

Gets the current Active Record instance. Creates new instance if the primary key value is null otherwise the record is fetched from the db.

- return: record instance
- access: protected

TActiveRecord getRecordObject ([array $pk = null])

- array $pk: primary key value

getRecordPkValues (line 66)

- return: record primary key values.
- access: protected

array getRecordPkValues (TActiveRecord $record)

- TActiveRecord $record: record instance

getRecordPropertyValues (line 54)

- return: record property values
- access: protected

array getRecordPropertyValues (TActiveRecord $record)

- TActiveRecord $record: record instance

getTableInfo (line 43)

- return: table/view information
- access: protected

TDbMetaData getTableInfo ()
onPreRender (line 196)

Publish the default stylesheet file.

- access: public

void onPreRender (mixed $param)

Redefinition of:

TControl::onPreRender()
  This method is invoked when the control enters 'OnPreRender' stage.

Redefined in descendants as:

- TScaffoldListView::onPreRender() : Loads and display the data.
- TScaffoldView::onPreRender() : Copy basic record details to the list/edit/search controls.

setDefaultStyle (line 172)

- access: public

void setDefaultStyle (string $value)

- string $value: default scaffold stylesheet name

setEnableDefaultStyle (line 188)

- access: public

void setEnableDefaultStyle (boolean $value)

- boolean $value: enable default stylesheet, default is true.

setRecordClass (line 89)

Name of the Active Record class to be viewed or scaffolded.

- access: public

void setRecordClass (string $value)

- string $value: Active Record class name.

setRecordObject (line 148)

- access: protected

void setRecordObject (TActiveRecord $value)

- TActiveRecord $value: Active Record instance.

#### Inherited Methods

Inherited From TTemplateControl

> TTemplateControl::createChildControls()
> TTemplateControl::getIsSourceTemplateControl()
> TTemplateControl::getMaster()
> TTemplateControl::getMasterClass()
> TTemplateControl::getTemplate()
> TTemplateControl::getTemplateDirectory()
> TTemplateControl::initRecursive()
> TTemplateControl::injectContent()
> TTemplateControl::loadTemplate()
> TTemplateControl::registerContent()
> TTemplateControl::registerContentPlaceHolder()
> TTemplateControl::setMasterClass()
> TTemplateControl::setTemplate()

Inherited From TCompositeControl

> TCompositeControl::initRecursive()

Inherited From TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::addToPostDataLoader()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::bubbleEvent()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::convertUniqueIdToClientId()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::dataBind()
> TControl::dataBindChildren()
> TControl::dataBindProperties()
> TControl::ensureChildControls()
> TControl::findControl()
> TControl::findControlsByID()
> TControl::findControlsByType()
> TControl::focus()
> TControl::getAdapter()
> TControl::getAllowChildControls()
> TControl::getAttribute()
> TControl::getAttributes()
> TControl::getChildControlsCreated()
> TControl::getClientID()
> TControl::getControls()
> TControl::getControlStage()
> TControl::getControlState()
> TControl::getCustomData()
> TControl::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasChildInitialized()
> TControl::getHasControls()
> TControl::getHasInitialized()
> TControl::getHasLoaded()
> TControl::getHasLoadedPostData()
> TControl::getHasPreRendered()
> TControl::getID()
> TControl::getNamingContainer()
> TControl::getPage()
> TControl::getParent()
> TControl::getRegisteredObject()
> TControl::getSkinID()
> TControl::getSourceTemplateControl()
> TControl::getTemplateControl()
> TControl::getUniqueID()
> TControl::getViewState()
> TControl::getVisible()
> TControl::hasAttribute()
> TControl::initRecursive()
> TControl::isDescendentOf()
> TControl::isObjectRegistered()
> TControl::loadRecursive()
> TControl::loadState()
> TControl::loadStateRecursive()
> TControl::onDataBinding()
> TControl::onInit()
> TControl::onLoad()
> TControl::onPreRender()
> TControl::onUnload()
> TControl::preRenderRecursive()
> TControl::raiseBubbleEvent()
> TControl::registerObject()
> TControl::removeAttribute()
> TControl::removedControl()
> TControl::render()
> TControl::renderChildren()
> TControl::renderControl()
> TControl::saveState()
> TControl::saveStateRecursive()
> TControl::setAdapter()
> TControl::setAttribute()
> TControl::setChildControlsCreated()
> TControl::setControlStage()
> TControl::setControlState()
> TControl::setCustomData()
> TControl::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> TControl::trackViewState()
> TControl::traverseChildControls()
> TControl::unbindProperty()
> TControl::unloadRecursive()
> TControl::unregisterObject()
> TControl::__get()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants

#### Inherited Constants

Inherited from TTemplateControl

> TTemplateControl::EXT_TEMPLATE

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Mon, 21 Apr 2008 11:36:05 -0400 by phpDocumentor 1.3.0RC4