Class yii\i18n\MissingTranslationEvent

继承yii\i18n\MissingTranslationEvent » yii\base\Event » yii\base\BaseObject
实现yii\base\Configurable
可用自版本2.0
源代码 https://github.com/yiisoft/yii2/blob/master/framework/i18n/MissingTranslationEvent.php

MissingTranslationEvent represents the parameter for the yii\i18n\MessageSource::EVENT_MISSING_TRANSLATION event.

公共属性

隐藏继承的属性

属性类型描述定义在
$category string The category that the message belongs to yii\i18n\MissingTranslationEvent
$data mixed 附加事件处理程序时传递给 yii\base\Component::on() 的数据. yii\base\Event
$handled boolean 事件是否被处理. yii\base\Event
$language string The language ID (e.g. en-US) that the message is to be translated to yii\i18n\MissingTranslationEvent
$message string The message to be translated. yii\i18n\MissingTranslationEvent
$name string 事件的名称. yii\base\Event
$sender object 此事件的发送者. yii\base\Event
$translatedMessage string The translated message. yii\i18n\MissingTranslationEvent

公共方法

隐藏继承的方法

方法描述定义在
__call() 调用不是类方法的已命名方法. yii\base\BaseObject
__construct() 构造函数. yii\base\BaseObject
__get() 返回对象属性的值. yii\base\BaseObject
__isset() 检查属性是否已设置, 即已定义且不为null. yii\base\BaseObject
__set() 设置对象属性的值. yii\base\BaseObject
__unset() 将对象属性设置为null. yii\base\BaseObject
canGetProperty() 返回一个值, 指示属性是否可读. yii\base\BaseObject
canSetProperty() 返回一个值, 指示属性是否可写. yii\base\BaseObject
className() 返回此类的完全限定名称. yii\base\BaseObject
hasHandlers() 返回一个值, 指示是否有附加到指定类级别事件的处理程序. yii\base\Event
hasMethod() 返回一个值, 指示方法是否已定义. yii\base\BaseObject
hasProperty() 返回一个值, 指示属性是否已定义. yii\base\BaseObject
init() 初始化对象. yii\base\BaseObject
off() 从类级别的事件中分离事件处理程序. yii\base\Event
offAll() 分离所有已注册的类级别事件处理程序. yii\base\Event
on() 将事件处理程序附加到类级别的事件. yii\base\Event
trigger() 触发类级别的事件. yii\base\Event

属性详情

$category public 属性

The category that the message belongs to

public string $category null
$language public 属性

The language ID (e.g. en-US) that the message is to be translated to

public string $language null
$message public 属性

The message to be translated. An event handler may use this to provide a fallback translation and set $translatedMessage if possible.

public string $message null
$translatedMessage public 属性

The translated message. An event handler may overwrite this property with a translated version of $message if possible. If not set (null), it means the message is not translated.

public string $translatedMessage null