Class lajax\translatemanager\models\ImportForm
Inheritance | lajax\translatemanager\models\ImportForm » yii\base\Model |
---|---|
Available since version | 1.5.0 |
Import Form.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$importFile | \yii\web\UploadedFile | The file to import (json or xml) | lajax\translatemanager\models\ImportForm |
Public Methods
Method | Description | Defined By |
---|---|---|
import() | Import the uploaded file. Existing languages and translations will be updated, new ones will be created. | lajax\translatemanager\models\ImportForm |
rules() | lajax\translatemanager\models\ImportForm |
Protected Methods
Method | Description | Defined By |
---|---|---|
parseImportFile() | Parse the uploaded file (xml or json) and return it as an array | lajax\translatemanager\models\ImportForm |
throwInvalidModelException() | Converts the model validation errors to a readable format an throws it as an exception | lajax\translatemanager\models\ImportForm |
Property Details
The file to import (json or xml)
Method Details
Import the uploaded file. Existing languages and translations will be updated, new ones will be created.
Source messages won't be updated, only created if they not exist.
public array import ( ) | ||
throws | \yii\web\BadRequestHttpException | |
---|---|---|
throws | \yii\base\Exception |
Parse the uploaded file (xml or json) and return it as an array
protected Array parseImportFile ( ) | ||
throws | \yii\web\BadRequestHttpException |
---|
public void rules ( ) |
Converts the model validation errors to a readable format an throws it as an exception
protected void throwInvalidModelException ( $model ) | ||
$model | \yii\db\ActiveRecord | |
throws | \yii\base\Exception |
---|