Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe ApiModel
+ Graphe d'héritage de ApiModel:

Fonctions membres publiques

 getFile ($adapter, $path='/', $options=[])
 
 getFiles ($adapter, $path='/', $options=[])
 
 createFolder ($adapter, $name, $path, $override)
 
 createFile ($adapter, $name, $path, $data, $override)
 
 updateFile ($adapter, $name, $path, $data)
 
 delete ($adapter, $path)
 
 copy ($adapter, $sourcePath, $destinationPath, $force=false)
 
 move ($adapter, $sourcePath, $destinationPath, $force=false)
 
 getUrl ($adapter, $path)
 
 search ($adapter, $needle, $path='/', $recursive=true)
 
- 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 privées

 isMediaFile ($path)
 

Attributs privés

 $allowedExtensions = null
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseModel
static addIncludePath ($path='', $prefix='')
 
- 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 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()
 
- Attributs protégés statiques hérités de BaseModel
static $paths
 

Description détaillée

Api Model

Depuis
4.0.0

Documentation des fonctions membres

◆ copy()

copy (   $adapter,
  $sourcePath,
  $destinationPath,
  $force = false 
)

Copies file or folder from source path to destination path If forced, existing files/folders would be overwritten

Paramètres
string$adapterThe adapter
string$sourcePathSource path of the file or folder (relative)
string$destinationPathDestination path(relative)
bool$forceForce to overwrite
Renvoie
string
Depuis
4.0.0
Exceptions

Références Joomla\Component\Media\Administrator\Provider\getAdapter().

◆ createFile()

createFile (   $adapter,
  $name,
  $path,
  $data,
  $override 
)

Creates a file with the given name in the given path with the data. More information can be found in AdapterInterface::createFile().

Paramètres
string$adapterThe adapter
string$nameThe name
string$pathThe folder
string$dataThe data
boolean$overrideShould the file being overridden when it exists
Renvoie
string
Depuis
4.0.0
Exceptions

Références $app, $data, $name, $path, $result, Joomla\Component\Media\Administrator\Provider\getAdapter(), Factory\getApplication(), File\getExt(), et PluginHelper\importPlugin().

◆ createFolder()

createFolder (   $adapter,
  $name,
  $path,
  $override 
)

Creates a folder with the given name in the given path. More information can be found in AdapterInterface::createFolder().

Paramètres
string$adapterThe adapter
string$nameThe name
string$pathThe folder
boolean$overrideShould the folder being overridden when it exists
Renvoie
string
Depuis
4.0.0
Exceptions

Références $app, $name, $path, $result, Joomla\Component\Media\Administrator\Provider\getAdapter(), Factory\getApplication(), et PluginHelper\importPlugin().

◆ delete()

delete (   $adapter,
  $path 
)

Deletes the folder or file of the given path. More information can be found in AdapterInterface::delete().

Paramètres
string$adapterThe adapter
string$pathThe path to the file or folder
Renvoie
void
Depuis
4.0.0
Exceptions

Références $app, $path, $result, $this, $type, Joomla\Component\Media\Administrator\Provider\getAdapter(), Factory\getApplication(), et PluginHelper\importPlugin().

◆ getFile()

getFile (   $adapter,
  $path = '/',
  $options = [] 
)

Returns the requested file or folder information. More information can be found in AdapterInterface::getFile().

Paramètres
string$adapterThe adapter
string$pathThe path to the file or folder
array$optionsThe options
Renvoie
Depuis
4.0.0
Exceptions

Références $options, $path, $this, Joomla\Component\Media\Administrator\Provider\getAdapter(), et Factory\getApplication().

◆ getFiles()

getFiles (   $adapter,
  $path = '/',
  $options = [] 
)

Returns the folders and files for the given path. More information can be found in AdapterInterface::getFiles().

Paramètres
string$adapterThe adapter
string$pathThe folder
array$optionsThe options
Renvoie
[]
Depuis
4.0.0
Exceptions

Références $key, $options, $path, $this, Joomla\Component\Media\Administrator\Provider\getAdapter(), Factory\getApplication(), et null.

◆ getUrl()

getUrl (   $adapter,
  $path 
)

Returns a url for serve media files from adapter. Url must provide a valid image type to be displayed on Joomla! site.

Paramètres
string$adapterThe adapter
string$pathThe relative path for the file
Renvoie
string Permalink to the relative file
Depuis
4.0.0
Exceptions
FileNotFoundException

Références $path, $url, Joomla\Component\Media\Administrator\Provider\getAdapter(), et Factory\getApplication().

◆ isMediaFile()

isMediaFile (   $path)
private

Checks if the given path is an allowed media file.

Paramètres
string$pathThe path to file
Renvoie
boolean
Depuis
4.0.0

Références $extension, $images, $mediaTypes, $path, $type, Factory\getApplication(), ComponentHelper\getParams(), et null.

◆ move()

move (   $adapter,
  $sourcePath,
  $destinationPath,
  $force = false 
)

Moves file or folder from source path to destination path If forced, existing files/folders would be overwritten

Paramètres
string$adapterThe adapter
string$sourcePathSource path of the file or folder (relative)
string$destinationPathDestination path(relative)
bool$forceForce to overwrite
Renvoie
string
Depuis
4.0.0
Exceptions

Références Joomla\Component\Media\Administrator\Provider\getAdapter().

◆ search()

search (   $adapter,
  $needle,
  $path = '/',
  $recursive = true 
)

Search for a pattern in a given path

Paramètres
string$adapterThe adapter to work on
string$needleThe search therm
string$pathThe base path for the search
bool$recursiveDo a recursive search
Renvoie
[]
Depuis
4.0.0
Exceptions

Références $path, et Joomla\Component\Media\Administrator\Provider\getAdapter().

◆ updateFile()

updateFile (   $adapter,
  $name,
  $path,
  $data 
)

Updates the file with the given name in the given path with the data. More information can be found in AdapterInterface::updateFile().

Paramètres
string$adapterThe adapter
string$nameThe name
string$pathThe folder
string$dataThe data
Renvoie
void
Depuis
4.0.0
Exceptions

Références $app, $data, $name, $path, $result, Joomla\Component\Media\Administrator\Provider\getAdapter(), Factory\getApplication(), File\getExt(), et PluginHelper\importPlugin().

Documentation des champs

◆ $allowedExtensions

$allowedExtensions = null
private

La documentation de cette classe a été générée à partir du fichier suivant :