Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de l'espace de nommage Joomla\Plugin\Editors\TinyMCE\PluginTraits

Fonctions

 onDisplay ( $name, $content, $width, $height, $col, $row, $buttons=true, $id=null, $asset=null, $author=null, $params=[])
 
 includeRelativeFiles ($folder, $file)
 
static resolveFileUrl ($path='')
 

Variables

trait DisplayTrait
 
trait ResolveFiles
 

Documentation des fonctions

◆ includeRelativeFiles()

Joomla\Plugin\Editors\TinyMCE\PluginTraits\includeRelativeFiles (   $folder,
  $file 
)
protected

Compute the file paths to be included

Paramètres
string$folderFolder name to search in (i.e. images, css, js).
string$filePath to file.
Renvoie
array files to be included.
Depuis
4.1.0
Exemples:
C:/laragon/www/_install/Joomla_422-Stable-Full_Package_French_v1/libraries/src/HTML/HTMLHelper.php.

Références $template, File\getExt(), JDEBUG, JPATH_ROOT, Joomla\Plugin\Editors\TinyMCE\PluginTraits\resolveFileUrl(), Uri\root(), et File\stripExt().

Référencé par HTMLHelper\image(), Joomla\Plugin\Editors\TinyMCE\PluginTraits\onDisplay(), HTMLHelper\script(), et HTMLHelper\stylesheet().

◆ onDisplay()

Joomla\Plugin\Editors\TinyMCE\PluginTraits\onDisplay (   $name,
  $content,
  $width,
  $height,
  $col,
  $row,
  $buttons = true,
  $id = null,
  $asset = null,
  $author = null,
  $params = [] 
)

Display the editor area.

Paramètres
string$nameThe name of the editor area.
string$contentThe content of the field.
string$widthThe width of the editor area.
string$heightThe height of the editor area.
int$colThe number of columns for the editor area.
int$rowThe number of rows for the editor area.
boolean$buttonsTrue and the editor buttons will be displayed.
string$idAn optional ID for the textarea. If not supplied the name is used.
string$assetThe object asset
object$authorThe author.
array$paramsAssociative array of editor parameters.
Renvoie
string

If URL, just pass it to $content_css else, assume it is a file name in the current template folder

Predefine group as: Set 0: for Administrator, Editor, Super Users (4,7,8) Set 1: for Registered, Manager (2,6), all else are public

Références $buttons, $content, $description, $doc, $editor, $height, $id, $language, $name, $options, $params, $path, $title, $toolbar, $user, $val, $width, Text\_(), HTMLHelper\_(), Uri\base(), elseif, Folder\exists(), false, Folder\files(), Session\getFormToken(), InputFilter\getInstance(), Joomla\Plugin\Editors\TinyMCE\PluginTraits\includeRelativeFiles(), JDEBUG, JPATH_ROOT, null, LayoutHelper\render(), Uri\root(), et Text\script().

◆ resolveFileUrl()

static Joomla\Plugin\Editors\TinyMCE\PluginTraits\resolveFileUrl (   $path = '')
staticprotected

Method that searches if file exists in given path and returns the relative path. If a minified version exists it will be preferred.

Paramètres
string$pathThe actual path of the file
Renvoie
string The relative path of the file
Depuis
4.1.0

Références $path, $position, JDEBUG, JPATH_ROOT, et Uri\root().

Référencé par Joomla\Plugin\Editors\TinyMCE\PluginTraits\includeRelativeFiles().

Documentation des variables

◆ DisplayTrait

trait DisplayTrait
Valeur initiale :
{
use GlobalFilters

Handles the onDisplay event for the TinyMCE editor.

Depuis
4.1.0

◆ ResolveFiles

trait ResolveFiles
Valeur initiale :
{
use ActiveSiteTemplate

Handles the editor.css files.

Depuis
4.1.0