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 TagBehavior

TagBehavior class file.

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by X2ActiveRecordBehavior
Extended by TagBehavior
Package: application\components
Located at x2engine/protected/components/TagBehavior.php
Methods summary
public
# rules( )

Specify rules to merge with rules array in X2ActiveRecord
(see X2ActiveRecord::rules()

Specify rules to merge with rules array in X2ActiveRecord (see X2ActiveRecord::rules()

Overrides

X2ActiveRecordBehavior::rules()
public
# enableTagTriggers( )
public
# disableTagTriggers( )
public
# afterSave( CModelEvent $event )

Responds to CModel::onAfterSave event.

Responds to CModel::onAfterSave event.

Matches tags provided they: - start with a # - consist of these characters: UTF-8 letters, numbers, _ and - (but only in the middle of the tag) - come after a space or . or are at the beginning - are not in quotes

Looks up any current tag records, and saves a tag record for each new tag. Note: does not delete tags when they are removed from text fields (this would screw with manual tagging)

Parameters

$event
CModelEvent
$event event parameter

Overrides

CActiveRecordBehavior::afterSave()
public
# afterDelete( CModelEvent $event )

Responds to CActiveRecord::onAfterDelete event. Deletes all the tags for this model

Responds to CActiveRecord::onAfterDelete event. Deletes all the tags for this model

Parameters

$event
CModelEvent
$event event parameter

Overrides

CActiveRecordBehavior::afterDelete()
public array
# scanForTags( )

Scans through every 'varchar' and 'text' field in the owner model for tags.

Scans through every 'varchar' and 'text' field in the owner model for tags.

Returns

array
an array of tags
public array
# matchTags( string $text )

Finds all tag matches in text

Finds all tag matches in text

Parameters

$text
string
$text

Returns

array
public true
# hasTag( string $tag, array $oldTags = null, mixed $refresh = false )

Parameters

$tag
string
$tag
$oldTags
array|null
$oldTags
$refresh

Returns

true
if record has tag already, false otherwise
public boolean
# hasTags( mixed $tags, array $mode = 'OR' )

Tests whether the owner model has any (OR mode) or all (AND mode) of the provided tags

Tests whether the owner model has any (OR mode) or all (AND mode) of the provided tags

Parameters

$tags
mixed
$tags sring or array of strings containing tags
$mode
array
$mode logic mode (either "AND" or "OR") for the test

Returns

boolean
the test result
public array
# getTags( mixed $refreshCache = false )

Looks up the tags associated with the owner model. Uses $tags as a cache to prevent repeated queries.

Looks up the tags associated with the owner model. Uses $tags as a cache to prevent repeated queries.

Returns

array
an array of tags
public
# setTags( mixed $tags, mixed $rawInput = false )
public
# compareTags( CDbCriteria $criteria )
public
# renderTagInput( )
public boolean
# addTags( mixed $tags )

Adds the specified tag(s) to the owner model, but not if the tag has already been added.

Adds the specified tag(s) to the owner model, but not if the tag has already been added.

Parameters

$tags
mixed
$tags a string or array of strings containing tags

Returns

boolean
whether or not at least one tag was added successfully
public boolean
# removeTags( mixed $tags )

Removes the specified tag(s) from the owner model

Removes the specified tag(s) from the owner model

Parameters

$tags
mixed
$tags a string or array of strings containing tags

Returns

boolean
whether or not at least one tag was deleted successfully
public
# clearTags( )

Deletes all tags associated with the owner model

Deletes all tags associated with the owner model

Methods inherited from CActiveRecordBehavior
afterFind(), beforeCount(), beforeDelete(), beforeFind(), beforeSave(), events()
Methods inherited from CModelBehavior
afterConstruct(), afterValidate(), beforeValidate()
Methods inherited from CBehavior
attach(), detach(), 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 boolean $disableTagScanning false
#

$disableTagScanning

$disableTagScanning

protected a $_tags null
#

cache of all tags associated with the owner model

cache of all tags associated with the owner model

Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled
X2CRM Documentation API documentation generated by ApiGen 2.8.0