Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

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
Extended by CBehavior implements IBehavior
Extended by QuickCRUDBehavior
Extended by QuickCreateRelationshipBehavior

Direct known subclasses

ActionsQuickCreateRelationshipBehavior
Package: application\components
Located at x2engine/protected/components/QuickCreateRelationshipBehavior.php
Methods summary
public static <array
# getModelsWhichSupportQuickCreate( mixed $includeActions = false )

Returns an array of all model classes (associated with some module) which have this behavior

Returns an array of all model classes (associated with some module) which have this behavior

Returns

<array
of strings>
public static array
# getCreateUrlsForModels( array $models )

Parameters

$models
array
$models

Returns

array
of urls for create actions of each model in $models
public static array
# getDialogTitlesForModels( array $models )

Returns array of dialog titles to be used for quick create dialogs for each model

Returns array of dialog titles to be used for quick create dialogs for each model

Parameters

$models
array
$models

Returns

array
public static array
# getDialogTooltipsForModels( array $models, string $modelName )

Returns array of tooltips to be applied to quick create buttons for each model

Returns array of tooltips to be applied to quick create buttons for each model

Parameters

$models
array
$models
$modelName
string
$modelName

Returns

array
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.

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.

If called from the record create page: No record exists yet for the second model. An array is echoed containing values of the first model which should be used to populate fields in the create form of the second model.

If called from the record view page: Attempts to create a new relationship between first and second models. If creation of new record is successful and if the second model has been updated, an updated detailView of the second model is returned.
If the first record could not be created, the create form is rendered again with errors.

Returns

boolean
true if errors were encountered, false otherwise
public
# renderInlineForm( object $model, array $viewParams = array () )

Renders an inline record create/update form

Renders an inline record create/update form

Parameters

$model
object
$model
$viewParams
boolean
$hasErrors
Methods inherited from QuickCRUDBehavior
getModelsWhichSupportQuickView(), getUrlsForModels()
Methods inherited from CBehavior
attach(), detach(), events(), getEnabled(), getOwner(), setEnabled()
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()
Properties summary
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.

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'
#
Magic properties inherited from CBehavior
$enabled, $owner
X2CRM Documentation API documentation generated by ApiGen 2.8.0