Class QuickCreateRelationshipBehavior
Provides utility methods for handling quick creation of records and relationships. This class involves the use of two models: The model associated with the owner of this behavior (referred to as 'the first model') and the model associated with the view from which the quick create ajax request was made (referred to as 'the second model').
- CComponent
- CBehavior implements IBehavior
- QuickCRUDBehavior
- QuickCreateRelationshipBehavior
Direct known subclasses
ActionsQuickCreateRelationshipBehaviorLocated at x2engine/protected/components/QuickCreateRelationshipBehavior.php
public static
<array
|
#
getModelsWhichSupportQuickCreate( mixed $includeActions = false )
Returns an array of all model classes (associated with some module) which have this behavior |
public static
array
|
|
public static
array
|
#
getDialogTitlesForModels( array $models )
Returns array of dialog titles to be used for quick create dialogs for each model |
public static
array
|
#
getDialogTooltipsForModels( array $models, string $modelName )
Returns array of tooltips to be applied to quick create buttons for each model |
public
boolean
|
#
quickCreate( mixed $model )
For controllers implementing this behavior, this method should be called if the GET parameter 'x2ajax' is set to '1' after the model is created and fields are set. |
public
|
#
renderInlineForm( object $model, array $viewParams = array () )
Renders an inline record create/update form |
getModelsWhichSupportQuickView(),
getUrlsForModels()
|
attach(),
detach(),
events(),
getEnabled(),
getOwner(),
setEnabled()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
public
array
|
$attributesOfNewRecordToUpdate | array () |
#
Used to specify which attributes (for a given model type) should be updated to match the first model's attribute values. |
protected
string
|
$inlineFormPathAlias | 'application.components.views._form' |
$enabled,
$owner
|