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 FileUploader

Widget to upload files via AJAX.

CComponent
Extended by CBaseController
Extended by CWidget
Extended by X2Widget
Extended by FileUploader

Direct known subclasses

ModelFileUploader
Package: application\components
Author: Alex Rowe <alex@x2engine.com> Examples Usage: widget('FileUploader', array( 'id' => 'myFileUploader', 'mediaParams' => array ( 'associationType' => 'Contacts', 'associationId' => 23 ), 'viewParams' => array ( 'showButton' => false ), 'events' => array ( 'success' => 'console.log("success")' ) 'acceptedFiles' => 'image/*' )); How to access in Javascript: x2.FileUploader.list['myFileUploader'] See js/FileUploader.js for Javascript Examples
Located at x2engine/protected/components/FileUploader.php
Methods summary
public
# init( )

Initializes the widget. This method is called by CBaseController::createWidget and CBaseController::beginWidget after the widget's properties have been initialized.

Initializes the widget. This method is called by CBaseController::createWidget and CBaseController::beginWidget after the widget's properties have been initialized.

Overrides

X2Widget::init()
public
# run( )

Executes the widget. This method is called by CBaseController::endWidget.

Executes the widget. This method is called by CBaseController::endWidget.

Overrides

CWidget::run()
public
# getPackages( )
public
# getJSClassParams( )
public
# registerJSEvents( mixed $events )
Methods inherited from X2Widget
__construct(), ajaxRender(), behaviors(), getModule(), renderFile(), setModule()
Methods inherited from CWidget
actions(), getController(), getId(), getOwner(), getViewFile(), getViewPath(), render(), setId()
Methods inherited from CBaseController
beginCache(), beginClip(), beginContent(), beginWidget(), createWidget(), endCache(), endClip(), endContent(), endWidget(), renderInternal(), widget()
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 static integer $instanceCount 0
#

Static counter for number of instances

Static counter for number of instances

public static array $defaultViewParams array ( 'class' => '', 'noPadding' => false, 'showButton' => true, 'open' => false, 'closeButton' => true, 'buttonText' => null, )
#

Config array of extra options to be sent to viewFile

Config array of extra options to be sent to viewFile

public string $JSClass 'FileUploader'
#

See

X2Widget::$JSClass
public string $viewFile 'fileUploader'
#

See

X2Widget::$viewFile
public string $id
#

Id / Namespace of this instance. Used to create a unique ID, and to reference

Id / Namespace of this instance. Used to create a unique ID, and to reference

public string $url '/site/upload'
#

Url to upload media to

Url to upload media to

public array $googleDrive true
#

Wether to allow Google Drive

Wether to allow Google Drive

public array $mediaParams array()
#

Array of model attributes to set to uploaded files

Array of model attributes to set to uploaded files

public array $viewParams array()
#

Array of model attributes to set to uploaded files

Array of model attributes to set to uploaded files

public array $events array( // 'success' => 'console.log(this)' )
#

Array of Javascript snippets

Array of Javascript snippets

public string $acceptedFiles ''
#
Properties inherited from X2Widget
$_module
Properties inherited from CWidget
$actionPrefix, $skin
Magic properties inherited from X2Widget
$module
Magic properties inherited from CWidget
$controller, $id, $owner, $viewPath
X2CRM Documentation API documentation generated by ApiGen 2.8.0