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

  • Quote
  • QuoteProduct
  • Overview
  • Package
  • Class
  • Tree

Class Quote

This is the model class for table "x2_quotes".

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by CActiveRecord
Extended by X2ActiveRecord
Extended by X2Model
Extended by Quote
Package: application\modules\quotes\models
Author: David Visbal, Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/modules/quotes/models/Quote.php
Methods summary
public static
# lineItemOrder( mixed $i0, mixed $i1 )
public
# getLineItems( )

Magic getter for lineItems.

Magic getter for lineItems.

public
# getAdjustmentLines( )

Magic getter for adjustmentLines

Magic getter for adjustmentLines

public
# getProductLines( )

Magic getter for productLines

Magic getter for productLines

public static Quotes
# model( string $className = __CLASS__ )

Returns the static model of the specified AR class.

Returns the static model of the specified AR class.

Parameters

$className
string
$className active record class name.

Returns

Quotes
the static model class

Overrides

X2Model::model()
public array
# relations( )

Returns

array
relational rules.

Overrides

X2Model::relations()
public string
# tableName( )

Returns

string
the associated database table name

Overrides

CActiveRecord::tableName()
public array
# behaviors( )

Returns a list of behaviors that this model should behave as.

Returns a list of behaviors that this model should behave as.

Returns

array
the behavior configurations (behavior name=>behavior configuration)

Overrides

X2Model::behaviors()
public array
# setLineItems( array $items, integer $save = false, boolean $skipProcessing = false )

Check a new set of line items against the existing set and update/delete as necessary

Check a new set of line items against the existing set and update/delete as necessary

Note: line numbers should be computed client-side and thus shouldn't need to be recalculated.

Parameters

$items
array
$items Each entry is an associative array of QuoteProduct [attribute]=>[value] pairs
$save
integer
$quoteId ID of quote for which to update items
$skipProcessing
boolean
$save Whether or not to save changes in the database after finishing

Returns

array
Array of QuoteProduct instances representing the item set after changes.

Throws

CException
public
# saveLineItems( )

Saves line item set changes to the database.

Saves line item set changes to the database.

public
# getContactId( )
public
# getAccountId( )
public
# createActionRecord( )

Creates an action history event record in the contact/account

Creates an action history event record in the contact/account

public
# createAssociatedAction( mixed $type, mixed $id )
public
# createEventRecord( )

Creates an event record for the creation of the model.

Creates an event record for the creation of the model.

public static
# getStatusList( )
public string
# productTable( type $emailTable = false )

Generates markup for a quote line items table.

Generates markup for a quote line items table.

Parameters

$emailTable
type
$emailTable Style hooks for emailing the quote

Returns

string
public static
# getNames( )
public static
# parseUsers( mixed $userArray )
public static
# parseUsersTwo( mixed $arr )
public static
# parseContacts( mixed $contactArray )
public static
# parseContactsTwo( mixed $arr )
public static
# getQuotesLinks( mixed $accountId )
public static
# editContactArray( mixed $arr, mixed $model )
public static
# editUserArray( mixed $arr, mixed $model )
public static
# editUsersInverse( mixed $arr )
public static
# editContactsInverse( mixed $arr )
public
# search( mixed $pageSize = null, mixed $uniqueId = null )
public
# searchInvoice( )
public
# getName( )

Overrides

X2ActiveRecord::getName()
public
# searchAdmin( )
public CActiveDataProvider
# searchBase( CDbCriteria $criteria, integer $pageSize = null, mixed $showHidden = false )

Base search function, includes Retrieves a list of models based on the current
search/filter conditions.

Base search function, includes Retrieves a list of models based on the current search/filter conditions.

Parameters

$criteria
CDbCriteria
$criteria the attribute name
$pageSize
integer
$pageSize If set, will override property of profile model
$showHidden

Returns

CActiveDataProvider
the data provider that can return the models based on the search/filter conditions.

Overrides

X2Model::searchBase()
public
# productNames( )

Get all active products indexed by their id, and any inactive products still in this quote

Get all active products indexed by their id, and any inactive products still in this quote

public
# productPrices( )
public
# activeProducts( )
public boolean
# beforeDelete( )

Clear out records associated with this quote before deletion.

Clear out records associated with this quote before deletion.

Returns

boolean
whether the record should be deleted. Defaults to true.

Overrides

CActiveRecord::beforeDelete()
Methods inherited from X2Model
__construct(), afterCreate(), afterDelete(), afterFind(), afterSave(), afterUpdate(), attributeChanged(), attributeLabels(), beforeSave(), checkThrowAttrError(), compareAssignment(), compareAttribute(), compareAttributes(), compareBoolean(), compareDropdown(), duplicateFields(), findAll(), findByAttributes(), findByEmail(), findByNameId(), findByPkInArray(), getAllRecordNames(), getAssignmentOptions(), getAssociationModel(), getAssociationType(), getAssociationTypeOptions(), getAttribute(), getAttributeLabel(), getAttributeLabels(), getDefaultAssignment(), getDefaultFormLayout(), getDisplayName(), getEditableAttributeNames(), getEditableFieldNames(), getField(), getFieldComparisonOptions(), getFieldPermissions(), getFields(), getFieldsForDropdown(), getInsertableAttributeTokens(), getIsExemptFromFieldLevelPermissions(), getLinkedAttribute(), getLinkedModel(), getLinkedModelMock(), getModelLink(), getModelLinkMock(), getModelName(), getModelNames(), getModelOfTypeWithId(), getModelOfTypeWithName(), getModelTitle(), getModelTypes(), getModelTypesWhichSupportRelationships(), getModelTypesWhichSupportWorkflow(), getModelsFromNames(), getModuleModel(), getModuleModelName(), getModuleModelNames(), getModuleModelsByName(), getModuleName(), getModules(), getMyModelName(), getOldAttributes(), getPhoneNumber(), getReadableAttributeNames(), getRecordName(), getSort(), getStaticLinkedModels(), getSummaryFields(), getTableNames(), getTranslatedModelTitles(), getVisibleAttributes(), hide(), insert(), isModuleModelName(), massUpdateNameId(), model2(), modelRules(), onAfterCreate(), onAfterInsert(), onAfterUpdate(), query(), queryFields(), renderErroneousField(), renderInput(), renderLinkedAttribute(), renderMergeInput(), renderModelAutocomplete(), renderModelInput(), resetFieldsPropertyCache(), rules(), runWithoutBehavior(), save(), setX2Fields(), translatedAttributeLabel(), unshiftOperator(), updateNameId(), updateNameIdRefs(), updateTimerTotals()
Methods inherited from X2ActiveRecord
getAllErrorMessages(), getBehaviorRules(), getFormatter(), getInputRenderer(), renderAttribute(), setFormatter(), setInputRenderer()
Methods inherited from CActiveRecord
__call(), __get(), __isset(), __set(), __sleep(), __unset(), addRelatedRecord(), afterFindInternal(), applyScopes(), attributeNames(), beforeCount(), beforeFind(), beforeFindInternal(), cache(), count(), countByAttributes(), countBySql(), defaultScope(), delete(), deleteAll(), deleteAllByAttributes(), deleteByPk(), equals(), exists(), find(), findAllByAttributes(), findAllByPk(), findAllBySql(), findByPk(), findBySql(), getActiveFinder(), getActiveRelation(), getAttributes(), getCommandBuilder(), getDbConnection(), getDbCriteria(), getIsNewRecord(), getMetaData(), getOldPrimaryKey(), getPrimaryKey(), getRelated(), getTableAlias(), getTableSchema(), hasAttribute(), hasRelated(), init(), instantiate(), offsetExists(), onAfterDelete(), onAfterFind(), onAfterSave(), onBeforeCount(), onBeforeDelete(), onBeforeFind(), onBeforeSave(), populateRecord(), populateRecords(), primaryKey(), refresh(), refreshMetaData(), resetScope(), saveAttributes(), saveCounters(), scopes(), setAttribute(), setDbCriteria(), setIsNewRecord(), setOldPrimaryKey(), setPrimaryKey(), setTableAlias(), together(), update(), updateAll(), updateByPk(), updateCounters(), with()
Methods inherited from CModel
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()
Methods inherited from CComponent
asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Constants inherited from CActiveRecord
BELONGS_TO, HAS_MANY, HAS_ONE, MANY_MANY, STAT
Properties summary
public true $supportsWorkflow false
#

if this model can have workflows associated with it, false otherwise

if this model can have workflows associated with it, false otherwise

public boolean $hasLineItemErrors false
#

Whether the line item set has errors in it.

Whether the line item set has errors in it.

public array $lineItemErrors array()
#
Properties inherited from X2Model
$_editableFieldNames, $_fieldPermissions, $_fields, $_linkedModels, $_nameIdRefs, $_oldAttributes, $_runAfterCreate, $associationModels, $autoPopulateFields, $dbPersistentGridSettings, $disablePersistentGridSettings, $fieldFormatterClass, $modelNameToModuleName, $subScenario, $supportsFieldLevelPermissions, $translatedModelTitles, $uid
Properties inherited from X2ActiveRecord
$fieldInputRendererClass
Properties inherited from CActiveRecord
$db
Magic properties summary
public array $adjustmentLines
#

(read-only) Line items that are adjustments to the subtotal

(read-only) Line items that are adjustments to the subtotal

public Contacts $contact
#

First contact associated with this quote.

First contact associated with this quote.

public array $lineItems
#

All line items for the quote.

All line items for the quote.

public array $productLines
#

(read-only) Line items that are products/services.

(read-only) Line items that are products/services.

Magic properties inherited from X2Model
$fieldPermissions, $isExemptFromFieldLevelPermissions, $myModelName, $readableAttributeNames, $relatedX2Models
Magic properties inherited from CActiveRecord
$attributes, $commandBuilder, $dbConnection, $dbCriteria, $isNewRecord, $metaData, $oldPrimaryKey, $primaryKey, $tableAlias, $tableSchema
Magic properties inherited from CModel
$errors, $iterator, $safeAttributeNames, $scenario, $validatorList, $validators
X2CRM Documentation API documentation generated by ApiGen 2.8.0