TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Feedit\FrontendEditPanel Class Reference
Inheritance diagram for TYPO3\CMS\Feedit\FrontendEditPanel:
tx_feedit_editpanel

Public Member Functions

 __construct ()
 
 editPanel ($content, array $conf, $currentRecord='', array $dataArr=array(), $table='', $allow='', $newUID=0, array $hiddenFields=array())
 
 editIcons ($content, $params, array $conf=array(), $currentRecord='', array $dataArr=array(), $addUrlParamStr='', $table, $editUid, $fieldList)
 

Protected Member Functions

 editPanelLinkWrap ($string, $formName, $cmd, $currentRecord='', $confirm='', $nPid='')
 
 editPanelLinkWrap_doWrap ($string, $url)
 
 isDisabled ($table, array $row)
 

Protected Attributes

 $cObj
 

Detailed Description

View class for the edit panels in frontend editing.

Definition at line 24 of file FrontendEditPanel.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Feedit\FrontendEditPanel::__construct ( )

Constructor for the edit panel

Definition at line 34 of file FrontendEditPanel.php.

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

Member Function Documentation

◆ editIcons()

TYPO3\CMS\Feedit\FrontendEditPanel::editIcons (   $content,
  $params,
array  $conf = array(),
  $currentRecord = '',
array  $dataArr = array(),
  $addUrlParamStr = '',
  $table,
  $editUid,
  $fieldList 
)

Adds an edit icon to the content string. The edit icon links to alt_doc.php with proper parameters for editing the table/fields of the context. This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).

Parameters
string$contentThe content to which the edit icons should be appended
string$paramsThe parameters defining which table and fields to edit. Syntax is [tablename]:[fieldname],[fieldname],[fieldname],... OR [fieldname],[fieldname],[fieldname],... (basically "[tablename]:" is optional, default table is the one of the "current record" used in the function). The fieldlist is sent as "&columnsOnly=" parameter to alt_doc.php
array$confTypoScript properties for configuring the edit icons.
string$currentRecordThe "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW
array$dataArrAlternative data array to use. Default is $this->data
string$addUrlParamStrAdditional URL parameters for the link pointing to alt_doc.php
string$table
integer$editUid
string$fieldList
Returns
string The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content.

Definition at line 173 of file FrontendEditPanel.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), TYPO3\CMS\Feedit\FrontendEditPanel\editPanelLinkWrap_doWrap(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Backend\Utility\IconUtility\skinImg().

◆ editPanel()

TYPO3\CMS\Feedit\FrontendEditPanel::editPanel (   $content,
array  $conf,
  $currentRecord = '',
array  $dataArr = array(),
  $table = '',
  $allow = '',
  $newUID = 0,
array  $hiddenFields = array() 
)

Generates the "edit panels" which can be shown for a page or records on a page when the Admin Panel is enabled for a backend users surfing the frontend. With the "edit panel" the user will see buttons with links to editing, moving, hiding, deleting the element This function is used for the cObject EDITPANEL and the stdWrap property ".editPanel"

Parameters
string$contentA content string containing the content related to the edit panel. For cObject "EDITPANEL" this is empty but not so for the stdWrap property. The edit panel is appended to this string and returned.
array$confTypoScript configuration properties for the editPanel
string$currentRecordThe "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW
array$dataArrAlternative data array to use. Default is $this->data
string$table
string$allow
integer$newUID
array$hiddenFields
Returns
string The input content string with the editPanel appended. This function returns only an edit panel appended to the content string if a backend user is logged in (and has the correct permissions). Otherwise the content string is directly returned.

Definition at line 54 of file FrontendEditPanel.php.

References $GLOBALS, TYPO3\CMS\Feedit\FrontendEditPanel\editPanelLinkWrap(), TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIcon(), and TYPO3\CMS\Feedit\FrontendEditPanel\isDisabled().

◆ editPanelLinkWrap()

TYPO3\CMS\Feedit\FrontendEditPanel::editPanelLinkWrap (   $string,
  $formName,
  $cmd,
  $currentRecord = '',
  $confirm = '',
  $nPid = '' 
)
protected

Helper function for editPanel() which wraps icons in the panel in a link with the action of the panel. The links are for some of them not simple hyperlinks but onclick-actions which submits a little form which the panel is wrapped in.

Parameters
string$stringThe string to wrap in a link, typ. and image used as button in the edit panel.
string$formNameThe name of the form wrapping the edit panel.
string$cmdThe command of the link. There is a predefined list available: edit, new, up, down etc.
string$currentRecordThe "table:uid" of the record being processed by the panel.
string$confirmText string with confirmation message; If set a confirm box will be displayed before carrying out the action (if Yes is pressed)
int | string$nPid"New pid" - for new records
Returns
string A tag wrapped string.

Definition at line 210 of file FrontendEditPanel.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Feedit\FrontendEditPanel\editPanelLinkWrap_doWrap(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

Referenced by TYPO3\CMS\Feedit\FrontendEditPanel\editPanel().

◆ editPanelLinkWrap_doWrap()

TYPO3\CMS\Feedit\FrontendEditPanel::editPanelLinkWrap_doWrap (   $string,
  $url 
)
protected

Creates a link to a script (eg. typo3/alt_doc.php or typo3/db_new.php) which either opens in the current frame OR in a pop-up window.

Parameters
string$stringThe string to wrap in a link, typ. and image used as button in the edit panel.
string$urlThe URL of the link. Should be absolute if supposed to work with <base> path set.
Returns
string A tag wrapped string.
See also
editPanelLinkWrap()

Definition at line 248 of file FrontendEditPanel.php.

Referenced by TYPO3\CMS\Feedit\FrontendEditPanel\editIcons(), and TYPO3\CMS\Feedit\FrontendEditPanel\editPanelLinkWrap().

◆ isDisabled()

TYPO3\CMS\Feedit\FrontendEditPanel::isDisabled (   $table,
array  $row 
)
protected

Returns TRUE if the input table/row would be hidden in the frontend, according to the current time and simulate user group

Parameters
string$tableThe table name
array$rowThe data record
Returns
boolean

Definition at line 267 of file FrontendEditPanel.php.

Referenced by TYPO3\CMS\Feedit\FrontendEditPanel\editPanel().

Member Data Documentation

◆ $cObj

TYPO3\CMS\Feedit\FrontendEditPanel::$cObj
protected

Definition at line 29 of file FrontendEditPanel.php.