PHP 클래스 Backend\Modules\Locale\Engine\Model

파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
buildCache ( string $language, string $application ) Build the language files
buildURLQueryByFilter ( array $filter ) : string Build a query for the URL based on the filter
createXMLForExport ( array $items ) : string Create an XML-string that can be used for export.
delete ( array $ids ) Delete (multiple) items from locale
exists ( integer $id ) : boolean Does an id exist.
existsByName ( string $name, string $type, string $module, string $language, string $application, integer $id = null ) : boolean Does a locale exists by its name.
get ( integer $id ) : array Get a single item from locale.
getByName ( string $name, string $type, string $module, string $language, string $application ) : boolean Get a locale by its name
getLanguagesForMultiCheckbox ( boolean $includeInterfaceLanguages = false ) : array Get the languages for a multicheckbox.
getTranslations ( string $application, string $module, array $types, array $languages, string $name, string $value ) : array Get the translations
getTypeName ( string $type ) : string Get full type name.
getTypesForDropDown ( ) : array Get all locale types.
getTypesForMultiCheckbox ( ) : array Get all locale types for a multicheckbox.
importXML ( SimpleXMLElement $xml, boolean $overwriteConflicts = false, array $frontendLanguages = null, array $backendLanguages = null, integer $userId = null, integer $date = null ) : array Import a locale XML file.
insert ( array $item ) : integer Insert a new locale item.
update ( array $item ) Update a locale item.

메소드 상세

buildCache() 공개 정적인 메소드

Build the language files
public static buildCache ( string $language, string $application )
$language string The language to build the locale-file for.
$application string The application to build the locale-file for.

buildURLQueryByFilter() 공개 정적인 메소드

Build a query for the URL based on the filter
public static buildURLQueryByFilter ( array $filter ) : string
$filter array The filter.
리턴 string

createXMLForExport() 공개 정적인 메소드

Create an XML-string that can be used for export.
public static createXMLForExport ( array $items ) : string
$items array The items.
리턴 string

delete() 공개 정적인 메소드

Delete (multiple) items from locale
public static delete ( array $ids )
$ids array The id(s) to delete.

exists() 공개 정적인 메소드

Does an id exist.
public static exists ( integer $id ) : boolean
$id integer The id to check for existence.
리턴 boolean

existsByName() 공개 정적인 메소드

Does a locale exists by its name.
public static existsByName ( string $name, string $type, string $module, string $language, string $application, integer $id = null ) : boolean
$name string The name of the locale.
$type string The type of the locale.
$module string The module wherein will be searched.
$language string The language to use.
$application string The application wherein will be searched.
$id integer The id to exclude in the check.
리턴 boolean

get() 공개 정적인 메소드

Get a single item from locale.
public static get ( integer $id ) : array
$id integer The id of the item to get.
리턴 array

getByName() 공개 정적인 메소드

Get a locale by its name
public static getByName ( string $name, string $type, string $module, string $language, string $application ) : boolean
$name string The name of the locale.
$type string The type of the locale.
$module string The module wherein will be searched.
$language string The language to use.
$application string The application wherein will be searched.
리턴 boolean

getLanguagesForMultiCheckbox() 공개 정적인 메소드

Get the languages for a multicheckbox.
public static getLanguagesForMultiCheckbox ( boolean $includeInterfaceLanguages = false ) : array
$includeInterfaceLanguages boolean Should we also get the interfacelanguages?
리턴 array

getTranslations() 공개 정적인 메소드

Get the translations
public static getTranslations ( string $application, string $module, array $types, array $languages, string $name, string $value ) : array
$application string The application.
$module string The module.
$types array The types of the translations to get.
$languages array The languages of the translations to get.
$name string The name.
$value string The value.
리턴 array

getTypeName() 공개 정적인 메소드

Get full type name.
public static getTypeName ( string $type ) : string
$type string The type of the locale.
리턴 string

getTypesForDropDown() 공개 정적인 메소드

Get all locale types.
public static getTypesForDropDown ( ) : array
리턴 array

getTypesForMultiCheckbox() 공개 정적인 메소드

Get all locale types for a multicheckbox.
public static getTypesForMultiCheckbox ( ) : array
리턴 array

importXML() 공개 정적인 메소드

Import a locale XML file.
public static importXML ( SimpleXMLElement $xml, boolean $overwriteConflicts = false, array $frontendLanguages = null, array $backendLanguages = null, integer $userId = null, integer $date = null ) : array
$xml SimpleXMLElement The locale XML.
$overwriteConflicts boolean Should we overwrite when there is a conflict?
$frontendLanguages array The frontend languages to install locale for.
$backendLanguages array The backend languages to install locale for.
$userId integer Id of the user these translations should be inserted for.
$date integer The date the translation has been inserted.
리턴 array The import statistics

insert() 공개 정적인 메소드

Insert a new locale item.
public static insert ( array $item ) : integer
$item array The data to insert.
리턴 integer

update() 공개 정적인 메소드

Update a locale item.
public static update ( array $item )
$item array The new data.