Constructor: Deletes the default installation config file and recreates it with the good config file.
InstallationModelLanguages
__construct
()
Redefinition of:
- JModelBase::__construct()
- Instantiate the model.
Create an article in a specific language
JTable
addArticle
(
stdClass $itemLanguage,
int $categoryId)
-
stdClass
$itemLanguage: Language Object
-
int
$categoryId: The id of the category where we want to add the article
Method create a category for a specific language
JTable
addCategory
(
stdClass $itemLanguage)
-
stdClass
$itemLanguage: Language Object
Add a Content Language
boolean
addLanguage
(stdClass $itemLanguage, string $sefLangString)
-
stdClass
$itemLanguage: Language Object
-
string
$sefLangString: String to use for SEF so it doesn't conflict
Add Menu Group
boolean
addMenuGroup
(stdClass $itemLanguage)
-
stdClass
$itemLanguage: Language Object
Add Menu Item.
boolean
addMenuItem
(stdClass $itemLanguage)
-
stdClass
$itemLanguage: Language Object
Add a Module in Module menus
boolean
addModuleInModuleMenu
(integer $moduleId)
-
integer
$moduleId: The Id of module
Enable the Language Switcher Module.
boolean
addModuleLanguageSwitcher
()
Add Module Menu
boolean
addModuleMenu
(stdClass $itemLanguage)
-
stdClass
$itemLanguage: Language Object
Compare two languages in order to sort them.
integer
compareLanguages
(object $lang1, object $lang2)
-
object
$lang1: The first language
-
object
$lang2: The second language
Disable Default Main Menu Module
boolean
disableModuleMainMenu
()
Download a language package from a URL and unpack it in the tmp folder.
array|bool
downloadPackage
(string $url)
-
string
$url: Url of the package
Enable a module
boolean
enableModule
(string $moduleName)
-
string
$moduleName: The Name of the module to activate
Enable a Joomla plugin
boolean
enablePlugin
(string $pluginName)
-
string
$pluginName: The name of plugin
Get the client object of Administrator or Frontend.
object
getClient
([string $client = 'administrator'])
-
string
$client: Name of the client object
Get the model form.
mixed
getForm
([string $view = null])
-
string
$view: The view being processed
Get Languages item data
array
getInstalledlangs
([string $cms_client = 'administrator'])
-
string
$cms_client: Name of the cms client
Get Languages item data for the Administrator
array
getInstalledlangsAdministrator
()
Get Languages item data for the Frontend
array
getInstalledlangsFrontend
()
Generate a list of language choices to install in the Joomla CMS
boolean
getItems
()
Get installed languages data.
object The
getLanguageList
([integer $client_id = 1])
-
integer
$client_id: The client ID to retrieve data for
Gets the manifest file of a selected language from a the language list in a update server.
string
getLanguageManifest
(integer $uid)
-
integer
$uid: The id of the language in the #__updates table
Get the current setup options from the session.
array
getOptions
()
Finds the url of the package to download.
string|bool
getPackageUrl
(string $remote_manifest)
-
string
$remote_manifest: Url to the manifest XML file of the remote package
Get the languages folder path.
string
getPath
()
Gets a unique language SEF string
This function checks other existing language with the same code, if they exist provides a unique SEF name. For instance: en-GB, en-US and en-AU will share the same SEF code by default: www.mywebsite.com/en/ To avoid this conflict, this function creates an specific SEF in case of existing conflict: For example: www.mywebsite.com/en-au/
string
getSefString
(stdClass $itemLanguage, stdClass[] $siteLanguages)
-
stdClass
$itemLanguage: Language Object
-
stdClass[]
$siteLanguages: All Language Objects
Method that installs in Joomla! the selected languages in the Languages View of the installer.
boolean
install
(array $lids)
-
array
$lids: List of the update_id value of the languages to install
Set the default language.
boolean
setDefault
(string $language, [string $cms_client = 'administrator'])
-
string
$language: The language to be set as default
-
string
$cms_client: The name of the CMS client
Inherited Methods
Inherited From JModelBase
JModelBase::__construct()
JModelBase::getState()
JModelBase::loadState()
JModelBase::setState()