Class BootstrapCode
CCodeModel is the base class for model classes that are used to generate code.
Each code generator should have at least one code model class that extends from this class. The purpose of a code model is to represent user-supplied parameters and use them to generate customized code.
Derived classes should implement the CrudCode::prepare()
method whose main task
is to fill up the CCodeModel::$files
property based on the user parameters.
The CCodeModel::$files
property should be filled with a set of CCodeFile
instances, each representing a single code file to be generated.
CCodeModel implements the feature of "sticky attributes". A sticky attribute is an attribute that can remember its last valid value, even if the user closes his browser window and reopen it. To declare an attribute is sticky, simply list it in a validation rule with the validator name being "sticky".
- CComponent
-
CModel implements IteratorAggregate, ArrayAccess
-
CFormModel
-
CCodeModel
-
CrudCode
-
BootstrapCode
Copyright: Copyright © Christoffer Niska 2011-
License: New BSD License
Author: Qiang Xue <qiang.xue@gmail.com>
Version: $Id$
Since: 1.1.2
Located at crisu83/yii-bootstrap/gii/bootstrap/BootstrapCode.php
Methods summary
public
|
Methods inherited from CrudCode
attributeLabels()
,
generateActiveField()
,
generateActiveLabel()
,
generateInputField()
,
generateInputLabel()
,
getControllerClass()
,
getControllerFile()
,
getControllerID()
,
getModelClass()
,
getModule()
,
getTableSchema()
,
getUniqueControllerID()
,
getViewPath()
,
guessNameColumn()
,
init()
,
prepare()
,
requiredTemplates()
,
rules()
,
successMessage()
,
validateModel()
Methods inherited from CCodeModel
class2id()
,
class2name()
,
class2var()
,
classExists()
,
confirmed()
,
errorMessage()
,
getStickyFile()
,
getTemplatePath()
,
getTemplates()
,
loadStickyAttributes()
,
pluralize()
,
render()
,
renderResults()
,
save()
,
saveStickyAttributes()
,
sticky()
,
validateReservedWord()
,
validateTemplate()
Methods inherited from CFormModel
__construct()
,
attributeNames()
Methods inherited from CModel
addError()
,
addErrors()
,
afterConstruct()
,
afterValidate()
,
beforeValidate()
,
behaviors()
,
clearErrors()
,
createValidators()
,
generateAttributeLabel()
,
getAttributeLabel()
,
getAttributes()
,
getError()
,
getErrors()
,
getIterator()
,
getSafeAttributeNames()
,
getScenario()
,
getValidatorList()
,
getValidators()
,
hasErrors()
,
isAttributeRequired()
,
isAttributeSafe()
,
offsetExists()
,
offsetGet()
,
offsetSet()
,
offsetUnset()
,
onAfterConstruct()
,
onAfterValidate()
,
onBeforeValidate()
,
onUnsafeAttribute()
,
setAttributes()
,
setScenario()
,
unsetAttributes()
,
validate()
Methods inherited from CComponent
__call()
,
__get()
,
__isset()
,
__set()
,
__unset()
,
asa()
,
attachBehavior()
,
attachBehaviors()
,
attachEventHandler()
,
canGetProperty()
,
canSetProperty()
,
detachBehavior()
,
detachBehaviors()
,
detachEventHandler()
,
disableBehavior()
,
disableBehaviors()
,
enableBehavior()
,
enableBehaviors()
,
evaluateExpression()
,
getEventHandlers()
,
hasEvent()
,
hasEventHandler()
,
hasProperty()
,
raiseEvent()
Magic methods summary
Constants summary
Constants inherited from CCodeModel
STATUS_ERROR
,
STATUS_NEW
,
STATUS_PREVIEW
,
STATUS_SUCCESS
Properties summary
Properties inherited from CrudCode
$baseControllerClass
,
$controller
,
$model
Properties inherited from CCodeModel
$answers
,
$files
,
$keywords
,
$status
,
$template
Magic properties inherited from CCodeModel
$stickyFile
,
$templatePath
,
$templates
Magic properties inherited from CModel
$attributes
,
$errors
,
$iterator
,
$safeAttributeNames
,
$scenario
,
$validatorList
,
$validators