Phundament App Class Reference
  • Package
  • Class
  • Tree

Packages

  • bootstrap
    • widgets
      • input
  • Image
  • None
  • p3admin
  • p3extensions
    • behaviors
    • commands
    • components
    • helpers
    • widgets
  • p3media
    • actions
    • controllers
    • models
  • p3pages
    • models
  • p3widgets
    • components
    • models
  • PHP
  • system
    • db
      • ar
    • gii
    • web
      • auth
      • helpers
      • widgets
  • yiiext
    • widgets
      • fancybox
      • lipsum
  • zii
    • widgets
      • grid

Classes

  • P3CryptBehavior
  • P3FileUploadBehavior
  • P3JSONBehavior
  • P3LoggableBehavior
  • P3MetaDataBehavior
  • P3TranslationBehavior

Class P3TranslationBehavior

Provides a translation for attributes in the specified relation

'Translation' => array(
  'class' => 'P3TranslationBehavior',
  'relation' => 'daContentTranslations',
  'fallbackLanguage' => 'de_de'
)
CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by P3TranslationBehavior
Package: p3extensions\behaviors
Copyright: Copyright © 2005-2011 diemeisterei GmbH
License: http://www.phundament.com/license/
Author: Tobias Munk <schmunk@usrbin.de>
Since: 3.0.3
Located at phundament/p3extensions/behaviors/P3TranslationBehavior.php

Methods summary

public mixed
# t( type $name, type $language = null, type $fallback = false )

Tranlates attribute

Tranlates attribute

Parameters

$name
type
$name attribute to translate
$language
type
$language preferred language
$fallback
type
$fallback fallback language

Returns

mixed
public
# getTranslationModel( mixed $language = null )
public
# hasTranslationAttribute( mixed $attr )

Methods inherited from CActiveRecordBehavior

afterDelete(), afterFind(), afterSave(), 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()

Magic methods summary

Properties summary

public string $relation
#

Name of the relation identifier in the model which should contain extended translation attributes

Name of the relation identifier in the model which should contain extended translation attributes

public type $fallbackLanguage
#

Language to use if preferred language is not found

Language to use if preferred language is not found

public type $fallbackIndicator
#

Value to use if fallback value from language is not found

Value to use if fallback value from language is not found

public type $fallbackValue
#

Value to use if fallback value from language is not found

Value to use if fallback value from language is not found

public type $attributesBlacklist
#

Attributes which should not be translated

Attributes which should not be translated

Magic properties inherited from CActiveRecordBehavior

$owner

Magic properties inherited from CBehavior

$enabled

Phundament App Class Reference API documentation generated by ApiGen 2.8.0