yii2-translatable | Translatable behavior aggregates | Internationalization library
kandi X-RAY | yii2-translatable Summary
kandi X-RAY | yii2-translatable Summary
Translatable behavior aggregates logic of linking translations to the primary model
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get translation entity .
- After validation .
- Check if model has translation .
- Get event events .
- After save callback .
- Returns the translation for the given language .
- Returns true if the property name can be translated .
- Checks if a property can be set .
- Get model translations .
yii2-translatable Key Features
yii2-translatable Examples and Code Snippets
Community Discussions
Trending Discussions on yii2-translatable
QUESTION
I need to set an attribute as safe for a related model. I use a search model with a translation relation. And there I want to set the title attribute as safe.
The problem is that the title attribute is required in the related ArticleTranslation model.
I use the yii2-translatable behavior from creocoder.
...ANSWER
Answered 2017-Aug-09 at 18:37If you want use the title attribute for search a related model based on relation in the joined model you should declare the proper public var for allow the use in search model (and declare this $title safe too) eg:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install yii2-translatable
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page