Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getTemplateList () | |
getUpdatedList ($state=false, $all=false, $cleanup=false) | |
getCoreList () | |
prepareCoreFiles ($dir, $element, $template) | |
publish ($ids, $value, $exid) | |
getFiles () | |
getDirectoryTree ($dir) | |
getCoreFile ($file, $client_id) | |
& | getTemplate () |
checkNewName () | |
getFromName () | |
copy () | |
cleanup () | |
getForm ($data=array(), $loadData=true) | |
& | getSource () |
save ($data) | |
getOverridesFolder ($name, $path) | |
getOverridesList () | |
createOverride ($override) | |
createTemplateOverride ($overridePath, $htmlPath) | |
deleteFile ($file) | |
createFile ($name, $type, $location) | |
uploadFile ($file, $location) | |
createFolder ($name, $location) | |
deleteFolder ($location) | |
renameFile ($file, $name) | |
getImage () | |
cropImage ($file, $w, $h, $x, $y) | |
resizeImage ($file, $width, $height) | |
getPreview () | |
getFont () | |
copyFile ($newName, $location, $file) | |
getArchive () | |
extractArchive ($file) | |
getMediaFiles () | |
child () | |
getAllTemplateStyles () | |
copyStyles () | |
Fonctions membres publiques hérités de FormModel | |
__construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null) | |
checkin ($pk=null) | |
checkout ($pk=null) | |
validate ($form, $data, $group=null) | |
Fonctions membres publiques hérités de BaseDatabaseModel | |
__construct ($config=array(), MVCFactoryInterface $factory=null) | |
getTable ($name='', $prefix='', $options=array()) | |
isCheckedOut ($item) | |
getDbo () | |
setDbo (DatabaseInterface $db=null) | |
__get ($name) | |
Fonctions membres publiques hérités de BaseModel | |
__construct ($config=array()) | |
getName () | |
Fonctions membres publiques hérités de CMSObject | |
__construct ($properties=null) | |
__toString () | |
def ($property, $default=null) | |
get ($property, $default=null) | |
getProperties ($public=true) | |
getError ($i=null, $toString=true) | |
getErrors () | |
set ($property, $value=null) | |
setProperties ($properties) | |
setError ($error) | |
Fonctions membres publiques hérités de StatefulModelInterface | |
getState ($property=null, $default=null) | |
setState ($property, $value=null) | |
Fonctions membres publiques hérités de DispatcherAwareInterface | |
setDispatcher (DispatcherInterface $dispatcher) | |
Fonctions membres publiques hérités de CurrentUserInterface | |
setCurrentUser (User $currentUser) | |
Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface | |
setCacheControllerFactory (CacheControllerFactoryInterface $factory) | |
Fonctions membres publiques hérités de DatabaseAwareInterface | |
setDatabase (DatabaseInterface $db) | |
Fonctions membres publiques hérités de FormFactoryAwareInterface | |
setFormFactory (FormFactoryInterface $factory) | |
Fonctions membres protégées | |
getFile ($path, $name) | |
storeFileInfo ($path, $name, $template) | |
populateState () | |
fixTemplateName () | |
loadFormData () | |
checkFormat ($ext) | |
Fonctions membres protégées hérités de BaseDatabaseModel | |
_getList ($query, $limitstart=0, $limit=0) | |
_getListCount ($query) | |
_createTable ($name, $prefix='Table', $config=array()) | |
bootComponent ($component) | |
dispatchEvent (EventInterface $event) | |
Attributs protégés | |
$template = null | |
$element = null | |
$mediaElement = null | |
Attributs protégés hérités de FormModel | |
$events_map = null | |
Attributs protégés hérités de BaseDatabaseModel | |
$option = null | |
$event_clean_cache = null | |
Attributs protégés hérités de BaseModel | |
$name | |
Attributs protégés hérités de CMSObject | |
$_errors = array() | |
Fonctions membres privées | |
getSafeName ($name) | |
validateDate ($date) | |
getBasePath () | |
Membres hérités additionnels | |
Fonctions membres publiques statiques hérités de BaseModel | |
static | addIncludePath ($path='', $prefix='') |
Attributs protégés statiques hérités de BaseModel | |
static | $paths |
Template model class.
|
protected |
Check if the extension is allowed and will be shown in the template manager
string | $ext | The extension to check if it is allowed |
Références $params, et ComponentHelper\getParams().
checkNewName | ( | ) |
Method to check if new template name already exists
Références $db, $name, $query, Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\getState().
child | ( | ) |
Method to create the templateDetails.xml for the child template
Références $app, $client, $result, $template, $user, $xml, Text\_(), Path\clean(), File\copy(), Folder\create(), Folder\delete(), Folder\exists(), File\exists(), Factory\getApplication(), ApplicationHelper\getClientInfo(), Joomla\CMS\MVC\Model\getState(), Factory\getUser(), et File\write().
cleanup | ( | ) |
Method to delete tmp folder
Références $app, Folder\delete(), Factory\getApplication(), et Joomla\CMS\MVC\Model\getState().
copy | ( | ) |
Method to check if new template name already exists
Références $app, $client, $folder, $languages, $manifest, $template, Text\_(), Path\clean(), Folder\copy(), File\copy(), Folder\create(), Folder\delete(), Folder\exists(), File\exists(), Factory\getApplication(), ApplicationHelper\getClientInfo(), Joomla\CMS\MVC\Model\getState(), et JPATH_SITE.
copyFile | ( | $newName, | |
$location, | |||
$file | |||
) |
Copy a file.
string | $newName | The name of the copied file |
string | $location | The final location where the file is to be copied |
string | $file | The name and location of the file |
Références $app, $explodeArray, $location, $path, Text\_(), Path\clean(), File\copy(), Factory\getApplication(), et Text\sprintf().
copyStyles | ( | ) |
Method to copy selected styles to the child template
Références $app, $columns, $db, $query, $style, $template, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), Text\sprintf(), et ArrayHelper\toInteger().
createFile | ( | $name, | |
$type, | |||
$location | |||
) |
Create new file.
string | $name | The name of file. |
string | $type | The extension of the file. |
string | $location | Location for the new file. |
Références $app, $base, $check, $location, $name, $type, Text\_(), Path\clean(), Factory\getApplication(), et Text\sprintf().
createFolder | ( | $name, | |
$location | |||
) |
Create new folder.
string | $name | The name of the new folder. |
string | $location | Location for the new folder. |
Références $app, $base, $location, $name, $path, Text\_(), Path\clean(), Folder\create(), et Factory\getApplication().
createOverride | ( | $override | ) |
Create overrides.
string | $override | The override location. |
Références $app, $client, $explodeArray, $name, $path, $return, $size, $template, $url, Text\_(), Path\clean(), Folder\create(), elseif, Folder\exists(), Factory\getApplication(), ApplicationHelper\getClientInfo(), et JPATH_ROOT.
createTemplateOverride | ( | $overridePath, | |
$htmlPath | |||
) |
Create override folder & file
string | $overridePath | The override location |
string | $htmlPath | The html location |
Références $folder, $return, File\copy(), Folder\create(), Folder\exists(), File\exists(), Folder\files(), Folder\folders(), Factory\getDate(), File\getExt(), null, et File\stripExt().
cropImage | ( | $file, | |
$w, | |||
$h, | |||
$x, | |||
$y | |||
) |
Crop an image.
string | $file | The name and location of the file |
string | $w | width. |
string | $h | height. |
string | $x | x-coordinate. |
string | $y | y-coordinate. |
Références $app, $image, $path, et Factory\getApplication().
deleteFile | ( | $file | ) |
Delete a particular file.
string | $file | The relative location of the file. |
Références $app, $return, Text\_(), File\delete(), et Factory\getApplication().
deleteFolder | ( | $location | ) |
Delete a folder.
string | $location | The name and location of the folder. |
Références $app, $base, $location, $path, $return, Text\_(), Path\clean(), Folder\delete(), et Factory\getApplication().
extractArchive | ( | $file | ) |
Extract contents of an archive file.
string | $file | The name and location of the file |
Références $app, $explodeArray, $i, $path, Text\_(), Path\clean(), et Factory\getApplication().
|
protected |
Method to rename the template in the XML files and rename the language files
Références $manifest, $result, $template, File\exists(), Folder\files(), Joomla\CMS\MVC\Model\getState(), File\move(), et File\write().
getAllTemplateStyles | ( | ) |
Method to get the parent template existing styles
Références $db, $query, $template, Joomla\Database\getDatabase(), et ParameterType\INTEGER.
getArchive | ( | ) |
Get the compressed files.
Références $app, $i, $path, Text\_(), Path\clean(), et Factory\getApplication().
|
private |
Method to resolve the base folder.
Références $app, $this, Factory\getApplication(), et JPATH_ROOT.
getCoreFile | ( | $file, | |
$client_id | |||
) |
Method to get the core file of override file
string | $file | Override file |
integer | $client_id | Client Id |
Références $app, $client, $explodeArray, $folder, $type, Path\clean(), elseif, Path\find(), Factory\getApplication(), ApplicationHelper\getClientInfo(), et JPATH_ROOT.
getCoreList | ( | ) |
Method to get a list of all the core files of override files.
Références $app, $b, $client, $path, $template, Path\clean(), Factory\getApplication(), et ApplicationHelper\getClientInfo().
getDirectoryTree | ( | $dir | ) |
|
protected |
Internal method to get file properties.
string | $path | The base path. |
string | $name | The file name. |
Références $name, $path, $temp, $this, et JPATH_ROOT.
getFiles | ( | ) |
Method to get a list of all the files to edit in a template.
Références $app, $client, $lang, $path, $result, $template, Text\_(), Path\clean(), Factory\getApplication(), ApplicationHelper\getClientInfo(), et Factory\getLanguage().
getFont | ( | ) |
Rename a file.
Références $app, $client, $explodeArray, $folder, $path, $template, $uri, Text\_(), Path\clean(), Factory\getApplication(), ApplicationHelper\getClientInfo(), et Uri\root().
getForm | ( | $data = array() , |
|
$loadData = true |
|||
) |
Method to get the record form.
array | $data | Data for the form. |
boolean | $loadData | True if the form is to load its own data (default case), false if not. |
Implémente FormModelInterface.
Références $app, $db, $form, $query, $state, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\loadForm().
getFromName | ( | ) |
Method to check if new template name already exists
getImage | ( | ) |
Get an image address, height and width.
Références $app, $image, $path, $uri, Text\_(), Path\clean(), Factory\getApplication(), JPATH_ROOT, et Uri\root().
getMediaFiles | ( | ) |
Method to get a list of all the files to edit in a template's media folder.
Références $app, $path, $result, $template, Text\_(), Path\clean(), Factory\getApplication(), JPATH_ROOT, et TemplatesHelper\parseXMLTemplateFile().
getOverridesFolder | ( | $name, | |
$path | |||
) |
getOverridesList | ( | ) |
Get a list of overrides.
Références $client, $component, $folder, $layout, $module, $modules, $path, $result, $template, $view, Path\clean(), Folder\folders(), ApplicationHelper\getClientInfo(), et JPATH_ROOT.
getPreview | ( | ) |
Template preview.
Références $app, $db, $query, $result, Text\_(), Factory\getApplication(), et Joomla\Database\getDatabase().
|
private |
Creates a safe file name for the given name.
string | $name | The filename |
Références $date, $explodeArray, $extension, $name, $size, et File\getExt().
& getSource | ( | ) |
Method to get a single record.
Références $app, $input, $item, $this, Text\_(), Path\check(), Path\clean(), Factory\getApplication(), Joomla\CMS\MVC\Model\getState(), et JPATH_ROOT.
& getTemplate | ( | ) |
Method to get the template information.
Références $app, $db, $query, $result, $template, $this, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), if, ParameterType\INTEGER, JPATH_ROOT, et TemplatesHelper\parseXMLTemplateFile().
getTemplateList | ( | ) |
Method to get all template list.
Références $db, $query, $results, Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\getState().
Method to get all updated file list.
boolean | $state | The optional parameter if you want unchecked list. |
boolean | $all | The optional parameter if you want all list. |
boolean | $cleanup | The optional parameter if you want to clean record which is no more required. |
Références $client, $db, $path, $query, $results, $state, $template, Path\clean(), elseif, ApplicationHelper\getClientInfo(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), et ParameterType\INTEGER.
|
protected |
Method to get the data that should be injected in the form.
Références $data, et Joomla\CMS\MVC\Model\preprocessData().
|
protected |
Method to auto-populate the model state.
Note. Calling getState in this method will result in recursion.
Références $app, $params, Factory\getApplication(), ComponentHelper\getParams(), et Joomla\CMS\MVC\Model\setState().
prepareCoreFiles | ( | $dir, | |
$element, | |||
$template | |||
) |
publish | ( | $ids, | |
$value, | |||
$exid | |||
) |
Method to update status of list.
array | $ids | The base path. |
array | $value | The file name. |
integer | $exid | The template extension id. |
Références $db, $id, $result, $value, elseif, Joomla\Database\getDatabase(), et ParameterType\INTEGER.
renameFile | ( | $file, | |
$name | |||
) |
Rename a file.
string | $file | The name and location of the old file |
string | $name | The new name of the file. |
Références $app, $explodeArray, $name, $path, $type, Text\_(), et Factory\getApplication().
resizeImage | ( | $file, | |
$width, | |||
$height | |||
) |
Resize an image.
string | $file | The name and location of the file |
string | $width | The new width of the image. |
string | $height | The new height of the image. |
Références $app, $height, $image, $path, $width, Factory\getApplication(), et Image\SCALE_FILL.
save | ( | $data | ) |
Method to store the source file contents.
array | $data | The source data to save. |
Références $app, $data, $explodeArray, $return, $template, $this, $user, Text\_(), Path\clean(), Factory\getApplication(), Path\getPermissions(), PluginHelper\importPlugin(), Path\isOwner(), JPATH_ROOT, null, Path\setPermissions(), Text\sprintf(), et File\write().
|
protected |
uploadFile | ( | $file, | |
$location | |||
) |
Upload new file.
array | $file | The uploaded file array. |
string | $location | Location for the new file. |
Références $app, $location, $path, $url, Text\_(), TemplateHelper\canUpload(), Path\clean(), Factory\getApplication(), File\makeSafe(), null, et File\upload().
|
private |
|
protected |
|
protected |
|
protected |