|
| getFiles () |
|
| getDirectoryTree ($dir) |
|
& | getTemplate () |
|
| checkNewName () |
|
| getFromName () |
|
| copy () |
|
| cleanup () |
|
| getForm ($data=array(), $loadData=true) |
|
& | getSource () |
|
| save ($data) |
|
| getOverridesFolder ($name, $path) |
|
| getOverridesList () |
|
| createOverride ($override) |
|
| createTemplateOverride ($overridePath, $htmlPath) |
|
| compileLess ($input) |
|
| 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) |
|
Template model class.
- Depuis
- 1.6
◆ checkFormat()
Check if the extension is allowed and will be shown in the template manager
- Paramètres
-
string | $ext | The extension to check if it is allowed |
- Renvoie
- boolean true if the extension is allowed false otherwise
- Depuis
- 3.6.0
Références $params.
◆ checkNewName()
Method to check if new template name already exists
- Renvoie
- boolean true if name is not used, false otherwise
- Depuis
- 2.5
Références $db, et $query.
◆ cleanup()
Method to delete tmp folder
- Renvoie
- boolean true if delete successful, false otherwise
- Depuis
- 2.5
Références $app.
◆ compileLess()
◆ copy()
Method to check if new template name already exists
- Renvoie
- boolean true if name is not used, false otherwise
- Depuis
- 2.5
Références $app, $client, $template, et jimport().
◆ copyFile()
copyFile |
( |
|
$newName, |
|
|
|
$location, |
|
|
|
$file |
|
) |
| |
Copy a file.
- Paramètres
-
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 |
- Renvoie
- boolean true if image resize successful, false otherwise.
- Depuis
- 3.2
Références $app, $client, $explodeArray, $file, $location, $path, et $template.
◆ createFile()
createFile |
( |
|
$name, |
|
|
|
$type, |
|
|
|
$location |
|
) |
| |
Create new file.
- Paramètres
-
string | $name | The name of file. |
string | $type | The extension of the file. |
string | $location | Location for the new file. |
- Renvoie
- boolean true if file created successfully, false otherwise
- Depuis
- 3.2
Références $app, $check, $client, $location, $name, $path, $template, et $type.
◆ createFolder()
createFolder |
( |
|
$name, |
|
|
|
$location |
|
) |
| |
Create new folder.
- Paramètres
-
string | $name | The name of the new folder. |
string | $location | Location for the new folder. |
- Renvoie
- boolean True if override folder is created successfully, false otherwise
- Depuis
- 3.2
Références $app, $client, $location, $name, $path, $template, et jimport().
◆ createOverride()
createOverride |
( |
|
$override | ) |
|
Create overrides.
- Paramètres
-
string | $override | The override location. |
- Renvoie
- boolean true if override creation is successful, false otherwise
- Depuis
- 3.2
Références $app, $client, $explodeArray, $name, $return, $template, $url, DIRECTORY_SEPARATOR, elseif, jimport(), et JPATH_ROOT.
◆ createTemplateOverride()
createTemplateOverride |
( |
|
$overridePath, |
|
|
|
$htmlPath |
|
) |
| |
Create override folder & file
- Paramètres
-
string | $overridePath | The override location |
string | $htmlPath | The html location |
- Renvoie
- boolean True on success. False otherwise.
Références $file, $files, $folder, $return, et null.
◆ cropImage()
cropImage |
( |
|
$file, |
|
|
|
$w, |
|
|
|
$h, |
|
|
|
$x, |
|
|
|
$y |
|
) |
| |
Crop an image.
- Paramètres
-
string | $file | The name and location of the file |
string | $w | width. |
string | $h | height. |
string | $x | x-coordinate. |
string | $y | y-coordinate. |
- Renvoie
- boolean true if image cropped successfully, false otherwise.
- Depuis
- 3.2
Références $app, $client, $file, $image, $path, et $template.
◆ deleteFile()
Delete a particular file.
- Paramètres
-
string | $file | The relative location of the file. |
- Renvoie
- boolean True if file deletion is successful, false otherwise
- Depuis
- 3.2
Références $app, $client, $file, $path, $return, et $template.
◆ deleteFolder()
deleteFolder |
( |
|
$location | ) |
|
◆ extractArchive()
Extract contents of an archive file.
- Paramètres
-
string | $file | The name and location of the file |
- Renvoie
- boolean true if image extraction is successful, false otherwise.
- Depuis
- 3.2
Références $app, $client, $explodeArray, $file, $i, $path, et $template.
◆ fixTemplateName()
Method to rename the template in the XML files and rename the language files
- Renvoie
- boolean true if successful, false otherwise
- Depuis
- 2.5
Références $file, $files, $manifest, $template, et jimport().
◆ getArchive()
◆ getDirectoryTree()
Get the directory tree.
- Paramètres
-
string | $dir | The path of the directory to scan |
- Renvoie
- array
- Depuis
- 3.2
Références $info, $key, et $value.
◆ getFile()
Internal method to get file properties.
- Paramètres
-
string | $path | The base path. |
string | $name | The file name. |
- Renvoie
- object
- Depuis
- 1.6
Références $name, $path, et $template.
◆ getFiles()
◆ getFont()
◆ getForm()
getForm |
( |
|
$data = array() , |
|
|
|
$loadData = true |
|
) |
| |
Method to get the record form.
- Paramètres
-
array | $data | Data for the form. |
boolean | $loadData | True if the form is to load its own data (default case), false if not. |
- Renvoie
- JForm A JForm object on success, false on failure
- Depuis
- 1.6
Références $app, $db, $form, $query, et $state.
◆ getFromName()
Method to check if new template name already exists
- Renvoie
- string name of current template
- Depuis
- 2.5
◆ getImage()
◆ getOverridesFolder()
getOverridesFolder |
( |
|
$name, |
|
|
|
$path |
|
) |
| |
Get overrides folder.
- Paramètres
-
string | $name | The name of override. |
string | $path | Location of override. |
- Renvoie
- object containing override name and path.
- Depuis
- 3.2
Références $folder, $name, et $path.
◆ getOverridesList()
◆ getPreview()
Template preview.
- Renvoie
- object object containing the id of the template.
- Depuis
- 3.2
Références $app, $db, et $query.
◆ getSource()
Method to get a single record.
- Renvoie
- mixed Object on success, false on failure.
- Depuis
- 1.6
Références $app, $client, $input, et $item.
◆ getTemplate()
Method to get the template information.
- Renvoie
- mixed Object if successful, false if not and internal error is set.
- Depuis
- 1.6
Références $app, $db, $query, et $template.
◆ loadFormData()
Method to get the data that should be injected in the form.
- Renvoie
- mixed The data for the form.
- Depuis
- 1.6
Références $data.
◆ populateState()
Method to auto-populate the model state.
Note. Calling getState in this method will result in recursion.
- Renvoie
- void
- Depuis
- 1.6
Références $app, $params, et jimport().
◆ renameFile()
renameFile |
( |
|
$file, |
|
|
|
$name |
|
) |
| |
Rename a file.
- Paramètres
-
string | $file | The name and location of the old file |
string | $name | The new name of the file. |
- Renvoie
- string Encoded string containing the new file location.
- Depuis
- 3.2
Références $app, $client, $explodeArray, $file, $name, $path, $template, et $type.
◆ resizeImage()
resizeImage |
( |
|
$file, |
|
|
|
$width, |
|
|
|
$height |
|
) |
| |
Resize an image.
- Paramètres
-
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. |
- Renvoie
- boolean true if image resize successful, false otherwise.
- Depuis
- 3.2
Références $app, $client, $file, $height, $image, $path, $template, et $width.
◆ save()
◆ uploadFile()
uploadFile |
( |
|
$file, |
|
|
|
$location |
|
) |
| |
Upload new file.
- Paramètres
-
string | $file | The name of the file. |
string | $location | Location for the new file. |
- Renvoie
- boolean True if file uploaded successfully, false otherwise
- Depuis
- 3.2
Références $app, $client, $file, $location, $path, $template, $url, TemplateHelper\canUpload(), jimport(), JPATH_ADMINISTRATOR, null, et JLoader\register().
◆ $element
◆ $template
La documentation de cette classe a été générée à partir du fichier suivant :