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.

  • author: Wei Zhuo <weizho[at]gmail[dot]com>
  • version: $Id: TScaffoldBase.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • abstract:
  • since: 3.1

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 copyFrom (TScaffoldBase $obj)
string getDefaultStyle ()
string getRecordClass ()
TActiveRecord getRecordObject ([array $pk = null])
array getRecordPkValues (TActiveRecord $record)
void onPreRender ( $param)
void setDefaultStyle (string $value)
void setEnableDefaultStyle (boolean $value)
void setRecordClass (string $value)
void setRecordObject ( $value)
Methods
clearRecordObject (line 109)

Unset the current record instance and table information.

  • access: protected
void clearRecordObject ()
copyFrom (line 99)

Copy the view details from another scaffold view instance.

  • access: protected
void copyFrom (TScaffoldBase $obj)
getDefaultStyle (line 165)
  • return: default scaffold stylesheet name
  • access: public
string getDefaultStyle ()
getEnableDefaultStyle (line 181)
  • return: enable default stylesheet, default is true.
  • access: public
boolean getEnableDefaultStyle ()
getRecordClass (line 81)

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

  • return: Active Record class name.
  • access: public
string getRecordClass ()
getRecordFinder (line 157)
  • return: Active Record finder instance
  • access: protected
TActiveRecord getRecordFinder ()
getRecordObject (line 120)

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)
getRecordPropertyValues (line 54)
  • return: record property values
  • access: protected
array getRecordPropertyValues (TActiveRecord $record)
getTableInfo (line 43)
  • return: table/view information
  • access: protected
TDbMetaData getTableInfo ()
onPreRender (line 197)

Publish the default stylesheet file.

  • access: public
void onPreRender ( $param)
  • $param

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

Redefined in descendants as:
setDefaultStyle (line 173)
  • access: public
void setDefaultStyle (string $value)
  • string $value: default scaffold stylesheet name
setEnableDefaultStyle (line 189)
  • access: public
void setEnableDefaultStyle (boolean $value)
  • boolean $value: enable default stylesheet, default is true.
setRecordClass (line 90)

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 149)
  • access: protected
void setRecordObject ( $value)

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::getIsSkinApplied()
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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()
Class Constants

Documentation generated on Mon, 25 Jun 2012 14:39:08 +0200 by phpDocumentor 1.4.3