infoweb\cms\helpers\LanguageHelper::isRtl PHP Method

isRtl() public static method

Check if language is an rtl language
public static isRtl ( $language ) : boolean
$language
return boolean
    public static function isRtl($language)
    {
        if (!isset(Yii::$app->params['rtl'])) {
            return false;
        }
        if (in_array($language, Yii::$app->params['rtl'])) {
            return true;
        }
        return false;
    }

Usage Example

    <?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]message")->widget(CKEditor::className(), ['name' => "TemplateLang[{$model->language}][message]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('email')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => $allowContentDuplication ? 'true' : 'false']]);
?>
    <?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>
</div>
All Usage Examples Of infoweb\cms\helpers\LanguageHelper::isRtl