TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Rtehtmlarea\SelectImage Class Reference
Inheritance diagram for TYPO3\CMS\Rtehtmlarea\SelectImage:
TYPO3\CMS\Recordlist\Browser\ElementBrowser tx_rtehtmlarea_select_image

Public Member Functions

 init ()
 
 initVariables ()
 
 getBodyTagAdditions ()
 
 insertPlainImage (Resource\File $fileObject, $altText='', $titleText='', $additionalParams='')
 
 getJSCode ($act, $editorNo, $sys_language_content)
 
 processSessionData ($data)
 
 main_rte ()
 
 initConfiguration ()
 
 getAllowedItems ($items)
 
 orderMenuDefinition ($menuDefinition)
 
 getHelpMessage ($act)
 
- Public Member Functions inherited from TYPO3\CMS\Recordlist\Browser\ElementBrowser
 getThisScript ()
 
 init ()
 
 initVariables ()
 
 initConfiguration ()
 
 getJsCode ()
 
 processSessionData ($data)
 
 main_rte ($wiz=FALSE)
 
 main_folder ()
 
 expandPage ()
 
 TBE_expandSubFolders (Folder $folder)
 
 expandFolder (Folder $folder, $extensionList='')
 
 TBE_expandFolder (Folder $folder, $extensionList='', $noThumbs=FALSE)
 
 folderList (Folder $baseFolder)
 
 TBE_dragNDrop (Folder $folder, $extensionList='')
 
 isWebFolder ($folder)
 
 checkFolder ($folder)
 
 barheader ($str)
 
 getMsgBox ($in_msg, $icon='icon_note')
 
 printCurrentUrl ($str)
 
 parseCurUrl ($href, $siteUrl)
 
 setRecordList ($recordList)
 
 uploadForm (Folder $folderObject)
 
 createFolder (Folder $folderObject)
 
 getBulkSelector ($filesCount)
 

Public Attributes

const PLAIN_MODE_IMAGE_FILE_EXTENSIONS = 'jpg,jpeg,gif,png'
 
 $extKey = 'rtehtmlarea'
 
 $content
 
 $allowedItems
 
 $allowedFileTypes = array()
 
 $editorNo
 
 $sys_language_content
 
 $thisConfig
 
 $buttonConfig
 
- Public Attributes inherited from TYPO3\CMS\Recordlist\Browser\ElementBrowser
 $siteURL
 
 $thisScript
 
 $thisConfig
 
 $setTarget
 
 $setClass
 
 $setTitle
 
 $setParams
 
 $doc
 
 $elements = array()
 
 $mode
 
 $act
 
 $expandPage
 
 $expandFolder
 
 $P
 
 $bparams
 
 $RTEtsConfigParams
 
 $PM
 
 $pointer
 
 $curUrlArray
 
 $curUrlInfo
 
 $fileProcessor
 

Protected Member Functions

 initDocumentTemplate ()
 
 getRTEImageStorageDir ()
 
 imageInsertJS ($url, $width, $height, $altText='', $titleText='', $additionalParams='')
 
 getImgPath ()
 
 getButtonConfig ()
 
 getDefaultClass ()
 
 setMaximumPlainImageDimensions ()
 
 fileIsSelectableInFileList (\TYPO3\CMS\Core\Resource\FileInterface $file, array $imgInfo)
 
- Protected Member Functions inherited from TYPO3\CMS\Recordlist\Browser\ElementBrowser
 determineScriptUrl ()
 
 initDocumentTemplate ()
 
 initHookObjects ($hookKey)
 
 initCurrentUrl ()
 
 getRTEConfig ()
 
 fileIsSelectableInFileList (\TYPO3\CMS\Core\Resource\FileInterface $file, array $imgInfo)
 
 areFieldChangeFunctionsValid ($handleFlexformSections=FALSE)
 

Protected Attributes

 $defaultClass
 
 $plainMaxWidth
 
 $plainMaxHeight
 
 $imgPath
 
 $imgObj
 
- Protected Attributes inherited from TYPO3\CMS\Recordlist\Browser\ElementBrowser
 $recordList = NULL
 
 $selectedFolder
 
 $hookObjects = array()
 

Detailed Description

Script Class

Author
Kasper Skårhøj kaspe.nosp@m.r@ty.nosp@m.po3.c.nosp@m.om

Definition at line 26 of file SelectImage.php.

Member Function Documentation

◆ fileIsSelectableInFileList()

TYPO3\CMS\Rtehtmlarea\SelectImage::fileIsSelectableInFileList ( \TYPO3\CMS\Core\Resource\FileInterface  $file,
array  $imgInfo 
)
protected

Checks if the given file is selectable in the file list.

In "plain" RTE mode only image files with a maximum width and height are selectable.

Parameters
\TYPO3\CMS\Core\Resource\FileInterface$file
array$imgInfoImage dimensions from ::getImageDimensions()
Returns
bool TRUE if file is selectable.

Definition at line 973 of file SelectImage.php.

References TYPO3\CMS\Rtehtmlarea\SelectImage\$plainMaxHeight, and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

◆ getAllowedItems()

TYPO3\CMS\Rtehtmlarea\SelectImage::getAllowedItems (   $items)

Get the allowed items or tabs

Parameters
string$items,initial list of possible items
Returns
array the allowed items

Definition at line 867 of file SelectImage.php.

References TYPO3\CMS\Rtehtmlarea\SelectImage\$allowedItems, TYPO3\CMS\Core\Utility\GeneralUtility\clientInfo(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\init().

◆ getBodyTagAdditions()

TYPO3\CMS\Rtehtmlarea\SelectImage::getBodyTagAdditions ( )

Provide the additional parameters to be included in the template body tag

Returns
string the body tag additions

Definition at line 148 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\initDocumentTemplate().

◆ getButtonConfig()

TYPO3\CMS\Rtehtmlarea\SelectImage::getButtonConfig ( )
protected

Get the configuration of the image button

Returns
array the configuration array of the image button

Definition at line 857 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\initConfiguration().

◆ getDefaultClass()

TYPO3\CMS\Rtehtmlarea\SelectImage::getDefaultClass ( )
protected

Get the default image class

Returns
string the default class, if any

Definition at line 913 of file SelectImage.php.

References TYPO3\CMS\Rtehtmlarea\SelectImage\$defaultClass.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\initConfiguration().

◆ getHelpMessage()

TYPO3\CMS\Rtehtmlarea\SelectImage::getHelpMessage (   $act)

Get the help message to be displayed on a given tab

Parameters
string$act,the identifier of the tab
Returns
string the text of the message

Definition at line 951 of file SelectImage.php.

References TYPO3\CMS\Recordlist\Browser\ElementBrowser\$act, and $GLOBALS.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\main_rte().

◆ getImgPath()

TYPO3\CMS\Rtehtmlarea\SelectImage::getImgPath ( )
protected

Get the path of the image to be inserted or modified

Returns
string path to the image

Definition at line 847 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\initConfiguration().

◆ getJSCode()

TYPO3\CMS\Rtehtmlarea\SelectImage::getJSCode (   $act,
  $editorNo,
  $sys_language_content 
)

Generate JS code to be used on the image insert/modify dialogue

Parameters
string$act,the action to be performed
string$editorNo,the number of the RTE instance on the page
string$sys_language_content,the language of the content element
Returns
string the generated JS code
Todo:
Define visibility

Definition at line 297 of file SelectImage.php.

References TYPO3\CMS\Recordlist\Browser\ElementBrowser\$act, TYPO3\CMS\Rtehtmlarea\SelectImage\$editorNo, $GLOBALS, TYPO3\CMS\Rtehtmlarea\SelectImage\$sys_language_content, TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Recordlist\Browser\ElementBrowser\getThisScript(), TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\main_rte().

◆ getRTEImageStorageDir()

TYPO3\CMS\Rtehtmlarea\SelectImage::getRTEImageStorageDir ( )
protected

Get the path to the folder where RTE images are stored

Returns
string the path to the folder where RTE images are stored
Deprecated:
since 6.2, will be removed in two versions

Definition at line 158 of file SelectImage.php.

References $GLOBALS, $uid, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), die, TYPO3\CMS\Rtehtmlarea\SelectImage\imageInsertJS(), TYPO3\CMS\Rtehtmlarea\SelectImage\insertPlainImage(), TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ imageInsertJS()

TYPO3\CMS\Rtehtmlarea\SelectImage::imageInsertJS (   $url,
  $width,
  $height,
  $altText = '',
  $titleText = '',
  $additionalParams = '' 
)
protected

Echo the HTML page and JS that will insert the image

Parameters
string$url,the url of the image
integer$width,the width of the image
integer$height,the height of the image
string$altText,text for the alt attribute of the image
string$titleText,text for the title attribute of the image
string$additionalParams,text representing more html attributes to be added on the img tag
Returns
void

Definition at line 263 of file SelectImage.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getRTEImageStorageDir(), and TYPO3\CMS\Rtehtmlarea\SelectImage\insertPlainImage().

◆ init()

◆ initConfiguration()

◆ initDocumentTemplate()

TYPO3\CMS\Rtehtmlarea\SelectImage::initDocumentTemplate ( )
protected

◆ initVariables()

TYPO3\CMS\Rtehtmlarea\SelectImage::initVariables ( )

◆ insertPlainImage()

TYPO3\CMS\Rtehtmlarea\SelectImage::insertPlainImage ( Resource\File  $fileObject,
  $altText = '',
  $titleText = '',
  $additionalParams = '' 
)

Insert a plain image

Parameters
\TYPO3\CMS\Core\Resource\File$fileObject,the image file
string$altText,text for the alt attribute of the image
string$titleText,text for the title attribute of the image
string$additionalParams,text representing more HTML attributes to be added on the img tag
Returns
void

Definition at line 235 of file SelectImage.php.

References TYPO3\CMS\Rtehtmlarea\SelectImage\imageInsertJS().

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getRTEImageStorageDir().

◆ main_rte()

◆ orderMenuDefinition()

TYPO3\CMS\Rtehtmlarea\SelectImage::orderMenuDefinition (   $menuDefinition)

Order the definition of menu items according to configured order

Parameters
array$menuDefinition,definition of menu items
Returns
array ordered menu definition

Definition at line 894 of file SelectImage.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\main_rte().

◆ processSessionData()

TYPO3\CMS\Rtehtmlarea\SelectImage::processSessionData (   $data)

Session data for this class can be set from outside with this method. Call after init()

Parameters
array$dataSession data array
Returns
array Session data and boolean which indicates that data needs to be stored in session because it's changed
Todo:
Define visibility

Definition at line 618 of file SelectImage.php.

References TYPO3\CMS\Recordlist\Browser\ElementBrowser\$act, TYPO3\CMS\Recordlist\Browser\ElementBrowser\$expandFolder, and TYPO3\CMS\Recordlist\Browser\ElementBrowser\expandFolder().

◆ setMaximumPlainImageDimensions()

TYPO3\CMS\Rtehtmlarea\SelectImage::setMaximumPlainImageDimensions ( )
protected

Set variables for maximum plain image dimensions

Returns
void

Definition at line 928 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\initConfiguration().

Member Data Documentation

◆ $allowedFileTypes

TYPO3\CMS\Rtehtmlarea\SelectImage::$allowedFileTypes = array()

Definition at line 47 of file SelectImage.php.

◆ $allowedItems

TYPO3\CMS\Rtehtmlarea\SelectImage::$allowedItems

Definition at line 45 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getAllowedItems().

◆ $buttonConfig

TYPO3\CMS\Rtehtmlarea\SelectImage::$buttonConfig

Definition at line 73 of file SelectImage.php.

◆ $content

TYPO3\CMS\Rtehtmlarea\SelectImage::$content
Todo:
Define visibility

Definition at line 43 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\main_rte().

◆ $defaultClass

TYPO3\CMS\Rtehtmlarea\SelectImage::$defaultClass
protected

Definition at line 49 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getDefaultClass().

◆ $editorNo

TYPO3\CMS\Rtehtmlarea\SelectImage::$editorNo

Definition at line 67 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getJSCode().

◆ $extKey

TYPO3\CMS\Rtehtmlarea\SelectImage::$extKey = 'rtehtmlarea'
Todo:
Define visibility

Definition at line 38 of file SelectImage.php.

◆ $imgObj

TYPO3\CMS\Rtehtmlarea\SelectImage::$imgObj
protected

Definition at line 75 of file SelectImage.php.

◆ $imgPath

TYPO3\CMS\Rtehtmlarea\SelectImage::$imgPath
protected

Definition at line 65 of file SelectImage.php.

◆ $plainMaxHeight

TYPO3\CMS\Rtehtmlarea\SelectImage::$plainMaxHeight
protected

◆ $plainMaxWidth

TYPO3\CMS\Rtehtmlarea\SelectImage::$plainMaxWidth
protected

Definition at line 56 of file SelectImage.php.

◆ $sys_language_content

TYPO3\CMS\Rtehtmlarea\SelectImage::$sys_language_content

Definition at line 69 of file SelectImage.php.

Referenced by TYPO3\CMS\Rtehtmlarea\SelectImage\getJSCode().

◆ $thisConfig

TYPO3\CMS\Rtehtmlarea\SelectImage::$thisConfig

Definition at line 71 of file SelectImage.php.

◆ PLAIN_MODE_IMAGE_FILE_EXTENSIONS

const TYPO3\CMS\Rtehtmlarea\SelectImage::PLAIN_MODE_IMAGE_FILE_EXTENSIONS = 'jpg,jpeg,gif,png'

These file extensions are allowed in the "plain" image selection mode.

Definition at line 33 of file SelectImage.php.