[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Installer/Adapter/ -> LanguageAdapter.php (summary)

Joomla! Content Management System

Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 898 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

LanguageAdapter:: (16 methods):
  copyBaseFiles()
  finaliseInstall()
  finaliseUninstall()
  removeExtensionFiles()
  setupInstallPaths()
  setupUninstall()
  storeExtension()
  install()
  _install()
  getSefString()
  update()
  discover()
  discover_install()
  refreshManifestCache()
  resetUserLanguage()
  createContentLanguage()


Class: LanguageAdapter  - X-Ref

Language installer

copyBaseFiles()   X-Ref
Method to copy the extension's base files from the `<files>` tag(s) and the manifest file

return: void

finaliseInstall()   X-Ref
Method to finalise the installation processing

return: void

finaliseUninstall()   X-Ref
Method to finalise the uninstallation processing

return: boolean

removeExtensionFiles()   X-Ref
Removes this extension's files

return: void

setupInstallPaths()   X-Ref
Method to do any prechecks and setup the install paths for the extension

return: void

setupUninstall()   X-Ref
Method to do any prechecks and setup the uninstall job

return: void

storeExtension()   X-Ref
Method to store the extension to the database

return: void

install()   X-Ref
Custom install method

Note: This behaves badly due to hacks made in the middle of 1.5.x to add
the ability to install multiple distinct packs in one install. The
preferred method is to use a package to install multiple language packs.

return: boolean|integer  The extension ID on success, boolean false on failure

_install($cname, $basePath, $clientId, &$element)   X-Ref
Install function that is designed to handle individual clients

param: string   $cname     Cname @todo: not used
param: string   $basePath  The base name.
param: integer  $clientId  The client id.
param: object   &$element  The XML element.
return: boolean|integer  The extension ID on success, boolean false on failure

getSefString($itemLanguageTag)   X-Ref
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/

param: string  $itemLanguageTag  Language Tag.
return: string

update()   X-Ref
Custom update method

return: boolean  True on success, false on failure

discover()   X-Ref
Custom discover method
Finds language files

return: \Joomla\CMS\Table\Extension[]  Array of discovered extensions.

discover_install()   X-Ref
Custom discover install method
Basically updates the manifest cache and leaves everything alone

return: integer  The extension id

refreshManifestCache()   X-Ref
Refreshes the extension table cache

return: boolean result of operation, true if updated, false on failure

resetUserLanguage()   X-Ref
Resets user language to default language

return: void

createContentLanguage($tag)   X-Ref
Create an unpublished content language.

param: $tag  string  The language tag



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer