core/model/modx/modtranslate095.class.php
MODX Revolution
Copyright 2006-2012 by MODX, LLC. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Package
- modx
\modTranslate095
Utility class for assisting in migrating content from older MODX releases.
- Children
- \modTranslator
Properties
\modParser095
$parser= 'null'
The parsing engine for interpreting Evolution-style tags
null
Details- Type
- \modParser095
Methods
__construct(
\modX $modx
)
:
void
Initializes the class and sets up a translation map
Name | Type | Description |
---|---|---|
$modx | \modX | A reference to the modX instance |
translateFiles(
boolean $save
=
false, array $files
=
array()
)
:
string
Translate specific files
Name | Type | Description |
---|---|---|
$save | boolean | If true, will save the translation |
$files | array | An array of files to translate |
Type | Description |
---|---|
string |
translateSite(
boolean $save
=
false, null $classes
=
null, array $files
=
array (), boolean | string $toFile
=
false
)
:
void
Translate the site into Revolution-style tags
Name | Type | Description |
---|---|---|
$save | boolean | Whether or not to actually save the content changed |
$classes | null | An array of classes and fields to translate |
$files | array | An array of files to attempt to translate |
$toFile | boolean | string | If true, will write the file to the specified log |