Class InstallationModelLanguages

Description

Language Installer model for the Joomla Core Installer.

  • since: 3.1

Located in /installation/model/languages.php (line 22)

JModelBase
   |
   --InstallationModelLanguages
Variable Summary
 Admin $adminId
 object Client $client
 array $data
 integer $langlist
 string $path
Method Summary
 InstallationModelLanguages __construct ()
 JTable addArticle (stdClass $itemLanguage, int $categoryId)
 JTable addCategory (stdClass $itemLanguage)
 boolean addLanguage (stdClass $itemLanguage, string $sefLangString)
 boolean addMenuGroup (stdClass $itemLanguage)
 boolean addMenuItem (stdClass $itemLanguage)
 boolean addModuleInModuleMenu (integer $moduleId)
 boolean addModuleMenu (stdClass $itemLanguage)
 integer compareLanguages (object $lang1, object $lang2)
 array|bool downloadPackage (string $url)
 boolean enableModule (string $moduleName)
 boolean enablePlugin (string $pluginName)
 object getClient ([string $client = 'administrator'])
 mixed getForm ([string $view = null])
 array getInstalledlangs ([string $cms_client = 'administrator'])
 boolean getItems ()
 object The getLanguageList ([integer $client_id = 1])
 string getLanguageManifest (integer $uid)
 array getOptions ()
 string|bool getPackageUrl (string $remote_manifest)
 string getPath ()
 string getSefString (stdClass $itemLanguage, stdClass[] $siteLanguages)
 boolean install (array $lids)
 boolean setDefault (string $language, [string $cms_client = 'administrator'])
Variables
Admin $adminId = null (line 52)
  • var: Id, author of all generated content
  • since: 3.1
  • access: protected
object Client $client = null (line 28)
  • var: object
  • since: 3.1
  • access: protected
array $data = null (line 34)
  • var: Languages description
  • since: 3.1
  • access: protected
integer $langlist = null (line 46)
  • var: Total number of languages installed
  • since: 3.1
  • access: protected
string $path = null (line 40)
  • var: Language path
  • since: 3.1
  • access: protected

Inherited Variables

Inherited from JModelBase

JModelBase::$state
Methods
Constructor __construct (line 59)

Constructor: Deletes the default installation config file and recreates it with the good config file.

  • since: 3.1
  • access: public
InstallationModelLanguages __construct ()

Redefinition of:
JModelBase::__construct()
Instantiate the model.
addArticle (line 1042)

Create an article in a specific language

  • return: Category Object
  • since: 3.2
  • access: public
JTable addArticle (stdClass $itemLanguage, int $categoryId)
  • stdClass $itemLanguage: Language Object
  • int $categoryId: The id of the category where we want to add the article
addCategory (line 993)

Method create a category for a specific language

  • return: Category Object
  • since: 3.2
  • access: public
JTable addCategory (stdClass $itemLanguage)
  • stdClass $itemLanguage: Language Object
addLanguage (line 704)

Add a Content Language

  • since: 3.2
  • access: public
boolean addLanguage (stdClass $itemLanguage, string $sefLangString)
  • stdClass $itemLanguage: Language Object
  • string $sefLangString: String to use for SEF so it doesn't conflict
addMenuGroup (line 760)

Add Menu Group

  • since: 3.2
  • access: public
boolean addMenuGroup (stdClass $itemLanguage)
  • stdClass $itemLanguage: Language Object
addMenuItem (line 806)

Add Menu Item.

  • since: 3.2
  • access: public
boolean addMenuItem (stdClass $itemLanguage)
  • stdClass $itemLanguage: Language Object
addModuleInModuleMenu (line 630)

Add a Module in Module menus

  • since: 3.2
  • access: public
boolean addModuleInModuleMenu (integer $moduleId)
  • integer $moduleId: The Id of module
addModuleLanguageSwitcher (line 578)

Enable the Language Switcher Module.

  • since: 3.2
  • access: public
boolean addModuleLanguageSwitcher ()
addModuleMenu (line 879)

Add Module Menu

  • since: 3.2
  • access: public
boolean addModuleMenu (stdClass $itemLanguage)
  • stdClass $itemLanguage: Language Object
compareLanguages (line 366)

Compare two languages in order to sort them.

  • since: 3.1
  • access: protected
integer compareLanguages (object $lang1, object $lang2)
  • object $lang1: The first language
  • object $lang2: The second language
disableModuleMainMenu (line 929)

Disable Default Main Menu Module

  • since: 3.2
  • access: public
boolean disableModuleMainMenu ()
downloadPackage (line 223)

Download a language package from a URL and unpack it in the tmp folder.

  • return: Package details or false on failure
  • since: 3.1
  • access: protected
array|bool downloadPackage (string $url)
  • string $url: Url of the package
enableModule (line 963)

Enable a module

  • since: 3.2
  • access: public
boolean enableModule (string $moduleName)
  • string $moduleName: The Name of the module to activate
enablePlugin (line 529)

Enable a Joomla plugin

  • since: 3.2
  • access: public
boolean enablePlugin (string $pluginName)
  • string $pluginName: The name of plugin
getClient (line 398)

Get the client object of Administrator or Frontend.

  • since: 3.1
  • access: protected
object getClient ([string $client = 'administrator'])
  • string $client: Name of the client object
getForm (line 482)

Get the model form.

  • return: JForm object on success, false on failure.
  • since: 3.1
  • access: public
mixed getForm ([string $view = null])
  • string $view: The view being processed
getInstalledlangs (line 278)

Get Languages item data

  • since: 3.1
  • access: protected
array getInstalledlangs ([string $cms_client = 'administrator'])
  • string $cms_client: Name of the cms client
getInstalledlangsAdministrator (line 252)

Get Languages item data for the Administrator

  • since: 3.1
  • access: public
array getInstalledlangsAdministrator ()
getInstalledlangsFrontend (line 264)

Get Languages item data for the Frontend

  • return: List of installed languages in the frontend application
  • since: 3.1
  • access: public
array getInstalledlangsFrontend ()
getItems (line 76)

Generate a list of language choices to install in the Joomla CMS

  • return: True if successful
  • since: 3.1
  • access: public
boolean getItems ()
getLanguageList (line 335)

Get installed languages data.

  • return: language data
  • since: 3.1
  • access: protected
object The getLanguageList ([integer $client_id = 1])
  • integer $client_id: The client ID to retrieve data for
getLanguageManifest (line 187)

Gets the manifest file of a selected language from a the language list in a update server.

  • since: 3.1
  • access: protected
string getLanguageManifest (integer $uid)
  • integer $uid: The id of the language in the #__updates table
getOptions (line 465)

Get the current setup options from the session.

  • since: 3.1
  • access: public
array getOptions ()
getPackageUrl (line 205)

Finds the url of the package to download.

  • since: 3.1
  • access: protected
string|bool getPackageUrl (string $remote_manifest)
  • string $remote_manifest: Url to the manifest XML file of the remote package
getPath (line 378)

Get the languages folder path.

  • return: The path to the languages folders
  • since: 3.1
  • access: protected
string getPath ()
getSefString (line 670)

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/

  • since: 3.2
  • access: public
string getSefString (stdClass $itemLanguage, stdClass[] $siteLanguages)
  • stdClass $itemLanguage: Language Object
  • stdClass[] $siteLanguages: All Language Objects
install (line 112)

Method that installs in Joomla! the selected languages in the Languages View of the installer.

  • return: True if successful
  • access: public
boolean install (array $lids)
  • array $lids: List of the update_id value of the languages to install
setDefault (line 415)

Set the default language.

  • since: 3.1
  • access: public
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()

Documentation generated on Tue, 19 Nov 2013 15:06:42 +0100 by phpDocumentor 1.4.3