pinyin

Categories

Component ID

2869158

Component name

pinyin

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

81

Component created

Component changed

Component body

Provides the pinyin short code(拼音简码) utility and fields.

The pinyin short code will be generate from label field string automatically.
拼音简码将会根据entity的label字段自动产生。

Example:

    $fields['pinyin'] = BaseFieldDefinition::create('pinyin_shortcode')
      ->setLabel('拼音码')
      ->setSetting('max_length', 16);

If the $entity->label() value is "中国", then the generated pinyin short code will be "zg"。