Class Workflow
This is the model class for table "x2_workflows".
- CComponent
- CModel implements IteratorAggregate, ArrayAccess
- CActiveRecord
- Workflow
Located at x2engine/protected/modules/workflow/models/Workflow.php
public static
|
|
public
string
|
|
public
array
|
#
behaviors( )
Returns a list of behaviors that this model should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure: 'behaviorName'=>array( 'class'=>'path.to.BehaviorClass', 'property1'=>'value1', 'property2'=>'value2', ) |
public
array
|
|
public
array
|
|
public
|
#
validateIsDefaultFor( mixed $attr )
isDefault should either be a boolean value or an array of module ids |
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
array
|
|
public static
|
|
public static
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
|
|
public static
|
#
validateAction( boolean $action, mixed $workflowStatus, mixed $stage, mixed $comment = '', mixed & $message = '' )
Validates a single workflow action. Like validateStageChange () except that only one stage change is validated. |
public static
array
|
#
moveFromStageAToStageB( integer $workflowId, integer $stageA, integer $stageB, object $model, array $comments = array() )
Moves a record up or down a workflow. Assumes that stageA is started but not completed. Intermediate stages and stageB can be in any state. |
public static
array
|
#
getWorkflowStatus( integer $workflowId, integer $modelId = 0, mixed $modelType = '' )
Retrieves information on all stages (their complete state, their stage dependencies, their stage permissions, and their comment requirements) and on the workflow itself (its complete and started state and its id) |
public static
array
|
|
public static
array
|
|
public
string
|
|
public static
<array
|
|
public static
<array
|
|
public static
<array
|
|
public
array
|
#
getWorkflowStageColors( integer $stageCount, mixed $getShaded = false )
get hex codes for each stage |
public static
array
|
#
getStageCounts( array & $workflowStatus, array $dateRange, string $users = '', string $modelType = 'contacts' )
Get number of records at each stage |
public static
|
#
getStageValues( mixed & $workflowStatus, mixed $dateRange, mixed $users = '', mixed $modelType = 'contacts' )
|
public static
array
|
#
getStageNameLinks( mixed & $workflowStatus, mixed $dateRange, mixed $users )
Helper method for the workflow view. |
public
|
|
public
CActiveDataProvider
|
|
public static
|
#
getStageRequirements( array $workflowStatus )
Returns stage requirements for each stage in the workflow |
public static
array
|
#
completeStage( integer $workflowId, integer $stageNumber, object $model, string $comment, boolean $autoStart = true, mixed $workflowStatus = null )
Completes a workflow stage |
public static
|
#
startStage( integer $workflowId, integer $stageNumber, object $model, mixed $workflowStatus = null )
Starts a workflow stage |
public static
|
#
revertStage( mixed $workflowId, mixed $stageNumber, mixed $model, mixed $unstart = true, mixed $workflowStatus = null )
Uncompletes a stage (if completed) or unstarts it (if started). |
public static
|
|
public
|
|
public static
array
|
|
public
|
|
public static
|
__call(),
__construct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
addRelatedRecord(),
afterDelete(),
afterFind(),
afterFindInternal(),
applyScopes(),
attributeNames(),
beforeCount(),
beforeDelete(),
beforeFind(),
beforeFindInternal(),
beforeSave(),
cache(),
count(),
countByAttributes(),
countBySql(),
defaultScope(),
delete(),
deleteAll(),
deleteAllByAttributes(),
deleteByPk(),
equals(),
exists(),
find(),
findAll(),
findAllByAttributes(),
findAllByPk(),
findAllBySql(),
findByAttributes(),
findByPk(),
findBySql(),
getActiveFinder(),
getActiveRelation(),
getAttribute(),
getAttributeLabel(),
getAttributes(),
getCommandBuilder(),
getDbConnection(),
getDbCriteria(),
getIsNewRecord(),
getMetaData(),
getOldPrimaryKey(),
getPrimaryKey(),
getRelated(),
getTableAlias(),
getTableSchema(),
hasAttribute(),
hasRelated(),
init(),
insert(),
instantiate(),
offsetExists(),
onAfterDelete(),
onAfterFind(),
onAfterSave(),
onBeforeCount(),
onBeforeDelete(),
onBeforeFind(),
onBeforeSave(),
populateRecord(),
populateRecords(),
primaryKey(),
query(),
refresh(),
refreshMetaData(),
resetScope(),
save(),
saveAttributes(),
saveCounters(),
scopes(),
setAttribute(),
setDbCriteria(),
setIsNewRecord(),
setOldPrimaryKey(),
setPrimaryKey(),
setTableAlias(),
together(),
update(),
updateAll(),
updateByPk(),
updateCounters(),
with()
|
addError(),
addErrors(),
afterConstruct(),
afterValidate(),
beforeValidate(),
clearErrors(),
createValidators(),
generateAttributeLabel(),
getError(),
getErrors(),
getIterator(),
getSafeAttributeNames(),
getScenario(),
getValidatorList(),
getValidators(),
hasErrors(),
isAttributeRequired(),
isAttributeSafe(),
offsetGet(),
offsetSet(),
offsetUnset(),
onAfterConstruct(),
onAfterValidate(),
onBeforeValidate(),
onUnsafeAttribute(),
setAttributes(),
setScenario(),
unsetAttributes(),
validate()
|
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
string |
DEFAULT_ALL_MODULES
|
'-1' |
BELONGS_TO,
HAS_MANY,
HAS_ONE,
MANY_MANY,
STAT
|
$db
|
$attributes,
$commandBuilder,
$dbConnection,
$dbCriteria,
$isNewRecord,
$metaData,
$oldPrimaryKey,
$primaryKey,
$tableAlias,
$tableSchema
|
$errors,
$iterator,
$safeAttributeNames,
$scenario,
$validatorList,
$validators
|