Commit b830361a authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Update t3lib mentions

Some core parts still mention t3lib classes after namespaces,
mostly in comments.

Resolves: #47138
Releases: 6.1

Change-Id: I0775fc10f8c901a02533e5bc0fe1c6aa2276758b
Reviewed-on: https://review.typo3.org/19803
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 896d3733
......@@ -427,7 +427,7 @@ class ClickMenu {
* @param string $type Type: "into" or "after
* @param array $elInfo Contains instructions about whether to copy or cut an element.
* @return array Item array, element in $menuItems
* @see t3lib_clipboard::pasteUrl()
* @see \TYPO3\CMS\Backend\Clipboard\Clipboard::pasteUrl()
* @internal
* @todo Define visibility
*/
......
......@@ -43,8 +43,8 @@ class TranslationConfigurationProvider {
*
* Since TYPO3 4.5 the flagIcon is not returned as a filename in "gfx/flags/*" anymore,
* but as a string <flags-xx>. The calling party should call
* t3lib_iconWorks::getSpriteIcon(<flags-xx>) to get an HTML which will represent
* the flag of this language.
* \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(<flags-xx>) to get an HTML
* which will represent the flag of this language.
*
* @param integer $page_id Page id (only used to get TSconfig configuration setting flag and label for default language)
* @param string $backPath Backpath for flags
......
......@@ -47,7 +47,6 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
* @param integer $id The uid of the page being handled
* @param array $rootLine The rootline of the page being handled
* @return array Array containing the parsed TSConfig and a flag whether the content was retrieved from cache
* @see t3lib_TSparser
*/
public function parseTSconfig($TStext, $type, $id = 0, array $rootLine = array()) {
$this->type = $type;
......
......@@ -50,7 +50,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
*
* @param string $string The condition to match against its criterias.
* @return boolean Whether the condition matched
* @see t3lib_tsparser::parse()
* @see \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::parse()
*/
protected function evaluateCondition($string) {
list($key, $value) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('=', $string, FALSE, 2);
......
......@@ -43,11 +43,11 @@ abstract class AbstractExtdirectContextMenu extends \TYPO3\CMS\Backend\ContextMe
* Note: This method should be overriden to fit your specific needs.
*
* The informations should contain the basic informations of a
* t3lib_tree_Node for further processing. Also the classname (property type)
* of the node should be given, because we need this information
* to create the ndoe.
* \TYPO3\CMS\Backend\Tree\TreeNode for further processing. Also the classname
* (property type) of the node should be given, because we need this information
* to create the node.
*
* @param stdClass $nodeData
* @param \stdClass $nodeData
* @return array
*/
public function getActionsForNodeArray($nodeData) {
......
......@@ -44,7 +44,7 @@ class LogoutController {
public function logout() {
// Logout written to log
$GLOBALS['BE_USER']->writelog(255, 2, 0, 1, 'User %s logged out from TYPO3 Backend', array($GLOBALS['BE_USER']->user['username']));
\t3lib_formProtection_Factory::get()->removeSessionTokenFromRegistry();
\TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->removeSessionTokenFromRegistry();
$GLOBALS['BE_USER']->logoff();
$redirect = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect'));
$redirectUrl = $redirect ? $redirect : 'index.php';
......
......@@ -28,7 +28,9 @@ namespace TYPO3\CMS\Backend\Controller;
***************************************************************/
/**
* Script Class, creating object of t3lib_TCEmain and sending the posted data to the object.
* Script Class, creating object of \TYPO3\CMS\Core\DataHandling\DataHandler and
* sending the posted data to the object.
*
* Used by many smaller forms/links in TYPO3, including the QuickEdit module.
* Is not used by alt_doc.php though (main form rendering script) - that uses the same class (TCEmain) but makes its own initialization (to save the redirect request).
* For all other cases than alt_doc.php it is recommended to use this script for submitting your editing forms - but the best solution in any case would probably be to link your application to alt_doc.php, that will give you easy form-rendering as well.
......
......@@ -357,7 +357,7 @@ class ColorpickerController {
if (!$this->imageError) {
if ($this->pickerImage) {
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('coords_x')) {
$this->colorValue = '#' . $this->getIndex(\t3lib_stdgraphic::imageCreateFromFile($this->pickerImage), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('coords_x'), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('coords_y'));
$this->colorValue = '#' . $this->getIndex(\TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageCreateFromFile($this->pickerImage), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('coords_x'), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('coords_y'));
}
$pickerFormImage = '
<p class="c-head">' . $GLOBALS['LANG']->getLL('colorpicker_fromImage', 1) . '</p>
......@@ -376,7 +376,7 @@ class ColorpickerController {
* Gets the HTML (Hex) Color Code for the selected pixel of an image
* This method handles the correct imageResource no matter what format
*
* @param pointer $im Valid ImageResource returned by t3lib_stdgraphic::imageCreateFromFile
* @param pointer $im Valid ImageResource returned by \TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageCreateFromFile
* @param integer $x X-Coordinate of the pixel that should be checked
* @param integer $y Y-Coordinate of the pixel that should be checked
* @return string HEX RGB value for color
......
......@@ -545,7 +545,7 @@ class DataPreprocessor {
* @param array $pParams Various parameters to pass-through
* @return array Modified $dataPart array.
* @access private
* @see t3lib_TCEmain::checkValue_flex_procInData(), renderRecord_flexProc_procInData_travDS()
* @see \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_flex_procInData(), renderRecord_flexProc_procInData_travDS()
* @todo Define visibility
*/
public function renderRecord_flexProc_procInData($dataPart, $dataStructArray, $pParams) {
......@@ -569,7 +569,7 @@ class DataPreprocessor {
* @param array $DSelements Data structure
* @param array $pParams Various parameters pass-through.
* @return void
* @see renderRecord_flexProc_procInData(), t3lib_TCEmain::checkValue_flex_procInData_travDS()
* @see \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_flex_procInData(), renderRecord_flexProc_procInData_travDS()
* @todo Define visibility
*/
public function renderRecord_flexProc_procInData_travDS(&$dataValues, $DSelements, $pParams) {
......@@ -798,7 +798,7 @@ class DataPreprocessor {
* @param array $elements The array of original elements - basically the field value exploded by ",
* @param array $fieldConfig Field configuration from TCA
* @param array $row The data array, currently. Used to set the "local_uid" for selecting MM relation records.
* @param string $table Current table name. passed on to t3lib_loadDBGroup
* @param string $table Current table name. passed on to \TYPO3\CMS\Core\Database\RelationHandler
* @return array An array with ids of the records from the input elements array.
* @access private
* @todo Define visibility
......
......@@ -27,7 +27,8 @@ namespace TYPO3\CMS\Backend\Form;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Interface for classes which hook into t3lib_TCEforms and do additional dbFileIcons processing
* Interface for classes which hook into \TYPO3\CMS\Backend\Form\FormEngine
* and do additional dbFileIcons processing
*
* @author Andy Grunwald <andreas.grunwald@wmdb.de>
*/
......@@ -42,13 +43,13 @@ interface DatabaseFileIconsHookInterface
* @param array $icons Defined icons next to the selector box.
* @param string $rightbox Thumbnail view of images. Only filled if there are other types as images. This images will be shown right next to the selectorbox.
* @param string $fName Form element name
* @param array $uidList The array of item-uids. Have a look at t3lib_TCEforms::dbFileIcons parameter "$itemArray
* @param array $additionalParams Array with additional parameters which are be available at method call. Includes $mode, $allowed, $itemArray, $onFocus, $table, $field, $uid. For more information have a look at PHPDoc-Comment of t3lib_TCEforms::dbFileIcons
* @param \TYPO3\CMS\Backend\Form\FormEngine $parentObject Parent t3lib_TCEforms object
* @param array $uidList The array of item-uids. Have a look at \TYPO3\CMS\Backend\Form\FormEngine::dbFileIcons parameter "$itemArray
* @param array $additionalParams Array with additional parameters which are be available at method call. Includes $mode, $allowed, $itemArray, $onFocus, $table, $field, $uid. For more information have a look at PHPDoc-Comment of \TYPO3\CMS\Backend\Form\FormEngine::dbFileIcons
* @param \TYPO3\CMS\Backend\Form\FormEngine $parentObject Parent object
* @return void
*/
public function dbFileIcons_postProcess(array &$params, &$selector, &$thumbnails, array &$icons, &$rightbox, &$fName, array &$uidList, array $additionalParams, \TYPO3\CMS\Backend\Form\FormEngine $parentObject);
}
?>
\ No newline at end of file
?>
......@@ -121,7 +121,7 @@ class InlineElement {
protected $hookObjects = array();
/**
* Initialize an instance of t3lib_TCEforms_inline
* Initialize
*
* @param \TYPO3\CMS\Backend\Form\FormEngine $tceForms Reference to an TCEforms instance
* @return void
......@@ -138,7 +138,8 @@ class InlineElement {
/**
* Initialized the hook objects for this class.
* Each hook object has to implement the interface t3lib_tceformsInlineHook.
* Each hook object has to implement the interface
* \TYPO3\CMS\Backend\Form\Element\InlineElementHookInterface
*
* @return void
*/
......@@ -354,7 +355,7 @@ class InlineElement {
* Render the form-fields of a related (foreign) record.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param array $rec The table record of the child/embedded table (normaly post-processed by t3lib_transferData)
* @param array $rec The table record of the child/embedded table (normaly post-processed by \TYPO3\CMS\Backend\Form\DataPreprocessor)
* @param array $config Content of $PA['fieldConf']['config']
* @return string The HTML code for this "foreign record
* @todo Define visibility
......@@ -470,7 +471,7 @@ class InlineElement {
* @return string The rendered form
*/
protected function renderMainFields($table, array $row, array $overruleTypesArray = array()) {
// The current render depth of t3lib_TCEforms:
// The current render depth of \TYPO3\CMS\Backend\Form\FormEngine
$depth = $this->fObj->renderDepth;
// If there is some information about already rendered palettes of our parent, store this info:
if (isset($this->fObj->palettesRendered[$depth][$table])) {
......@@ -692,7 +693,7 @@ class InlineElement {
* so two tables are combined (the intermediate table with attributes and the sub-embedded table).
* -> This is a direct embedding over two levels!
*
* @param array $rec The table record of the child/embedded table (normaly post-processed by t3lib_transferData)
* @param array $rec The table record of the child/embedded table (normaly post-processed by \TYPO3\CMS\Backend\Form\DataPreprocessor)
* @param string $appendFormFieldNames The [<table>][<uid>] of the parent record (the intermediate table)
* @param array $config content of $PA['fieldConf']['config']
* @return string A HTML string with <table> tag around.
......@@ -978,7 +979,7 @@ class InlineElement {
/**
* Construct runtime environment for Inline Relational Record Editing.
* - creates an anoymous SC_alt_doc in $GLOBALS['SOBE']
* - creates a t3lib_TCEforms in $GLOBALS['SOBE']->tceforms
* - creates a \TYPO3\CMS\Backend\Form\FormEngine in $GLOBALS['SOBE']->tceforms
* - sets ourself as reference to $GLOBALS['SOBE']->tceforms->inline
* - sets $GLOBALS['SOBE']->tceforms->RTEcounter to the current situation on client-side
*
......@@ -1080,7 +1081,7 @@ class InlineElement {
$expandSingle = isset($config['appearance']['expandSingle']) && $config['appearance']['expandSingle'];
// Put the current level also to the dynNestedStack of TCEforms:
$this->fObj->pushToDynNestedStack('inline', $this->inlineNames['object']);
// Dynamically create a new record using t3lib_transferData
// Dynamically create a new record using \TYPO3\CMS\Backend\Form\DataPreprocessor
if (!$foreignUid || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($foreignUid) || $config['foreign_selector']) {
$record = $this->getNewRecord($this->inlineFirstPid, $current['table']);
// Set language of new child record to the language of the parent record:
......@@ -1381,7 +1382,7 @@ class InlineElement {
$itemArray = $this->getRelatedRecordsUidArray($itemList);
// Perform modification of the selected items array:
foreach ($itemArray as $uid) {
// Get the records for this uid using t3lib_transferdata:
// Get the records for this uid using \TYPO3\CMS\Backend\Form\DataPreprocessor
if ($record = $this->getRecord($pid, $table, $uid)) {
$records[$uid] = $record;
}
......@@ -1555,13 +1556,14 @@ class InlineElement {
/**
* Get a single record row for a TCA table from the database.
* t3lib_transferData is used for "upgrading" the values, especially the relations.
* \TYPO3\CMS\Backend\Form\DataPreprocessor is used for "upgrading" the
* values, especially the relations.
*
* @param integer $pid The pid of the page the record should be stored (only relevant for NEW records)
* @param string $table The table to fetch data from (= foreign_table)
* @param string $uid The uid of the record to fetch, or the pid if a new record should be created
* @param string $cmd The command to perform, empty or 'new'
* @return array A record row from the database post-processed by t3lib_transferData
* @return array A record row from the database post-processed by \TYPO3\CMS\Backend\Form\DataPreprocessor
* @todo Define visibility
*/
public function getRecord($pid, $table, $uid, $cmd = '') {
......@@ -1587,7 +1589,7 @@ class InlineElement {
*
* @param integer $pid The pid of the page the record should be stored (only relevant for NEW records)
* @param string $table The table to fetch data from (= foreign_table)
* @return array A record row from the database post-processed by t3lib_transferData
* @return array A record row from the database post-processed by \TYPO3\CMS\Backend\Form\DataPreprocessor
* @todo Define visibility
*/
public function getNewRecord($pid, $table) {
......
......@@ -26,17 +26,18 @@ namespace TYPO3\CMS\Backend\Form\Element;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Interface for classes which hook into t3lib_TCEforms_inline.
* Interface for classes which hook into \TYPO3\CMS\Backend\Form\Element\InlineElement
*
* @author Oliver Hader <oh@inpublica.de>
*/
interface InlineElementHookInterface
{
interface InlineElementHookInterface {
/**
* Initializes this hook object.
*
* @param \TYPO3\CMS\Backend\Form\Element\InlineElement $parentObject The calling t3lib_TCEforms_inline object.
* @param \TYPO3\CMS\Backend\Form\Element\InlineElement $parentObject
* @return void
*/
public function init(&$parentObject);
......
......@@ -329,7 +329,7 @@ class SuggestDefaultReceiver {
}
/**
* Return the icon for a record - just a wrapper for two functions from t3lib_iconWorks
* Return the icon for a record - just a wrapper for two functions from \TYPO3\CMS\Backend\Utility\IconUtility
*
* @param array $row The record to get the icon for
* @return string The path to the icon
......
......@@ -39,11 +39,13 @@ class SuggestElement {
public $cssClass = 'typo3-TCEforms-suggest';
// Reference to t3lib_tceforms
/**
* @var \TYPO3\CMS\Backend\Form\FormEngine
*/
public $TCEformsObj;
/**
* Initialize an instance of t3lib_TCEforms_suggest
* Initialize an instance of SuggestElement
*
* @param \TYPO3\CMS\Backend\Form\FormEngine $tceForms Reference to an TCEforms instance
* @return void
......
......@@ -104,7 +104,7 @@ class ValueSlider {
elementType: "' . $elementType . '"
});
';
/** @var $pageRenderer t3lib_pageRenderer */
/** @var $pageRenderer \TYPO3\CMS\Core\Page\PageRenderer */
$pageRenderer = $GLOBALS['SOBE']->doc->getPageRenderer();
$pageRenderer->addExtOnReadyCode($js);
return $contents;
......
......@@ -70,7 +70,7 @@ class FlexFormsHelper extends \TYPO3\CMS\Backend\Form\FormEngine {
* @param array $tableRow The record data
* @param array $tableConf Additional configuration options
* @return array Modified FlexForm DS
* @see t3lib_TCEforms::getSingleField_typeFlex()
* @see \TYPO3\CMS\Backend\Form\FormEngine::getSingleField_typeFlex()
*/
public function modifyFlexFormDS(array $dataStructure, $table, $tableField, array $tableRow, array $tableConf) {
$singleSheet = !isset($dataStructure['sheets']) || !is_array($dataStructure['sheets']);
......@@ -153,7 +153,7 @@ class FlexFormsHelper extends \TYPO3\CMS\Backend\Form\FormEngine {
* @param array $sheetConf Sheet configuration
* @param array $nonExcludeFields Non-exclude-fields for this sheet
* @return array Modified sheet
* @see t3lib_TCEforms_flex::modifyFlexFormDS()
* @see \TYPO3\CMS\Backend\Form\FlexFormsHelper::modifyFlexFormDS()
*/
public function modifySingleFlexFormSheet(array $sheet, $table, $tableField, array $tableRow, array $sheetConf, array $nonExcludeFields) {
if (empty($sheet) || empty($table) || empty($tableField) || empty($tableRow)) {
......@@ -242,7 +242,7 @@ class FlexFormsHelper extends \TYPO3\CMS\Backend\Form\FormEngine {
* @param string $tableField The field name
* @param string $extIdent The extension identifier
* @return array All non_exclude_fields from FlexForms
* @see t3lib_TCEforms::getSingleField_typeFlex()
* @see \TYPO3\CMS\Backend\Form\FormEngine::getSingleField_typeFlex()
*/
protected function getFlexFormNonExcludeFields($table, $tableField, $extIdent) {
if (empty($GLOBALS['BE_USER']->groupData['non_exclude_fields']) || empty($table) || empty($tableField) || empty($extIdent)) {
......
......@@ -525,8 +525,6 @@ class FormEngine {
public $additionalJS_delete = array();
/**
* Instance of t3lib_tceforms_inline
*
* @var \TYPO3\CMS\Backend\Form\Element\InlineElement
* @todo Define visibility
*/
......@@ -593,11 +591,11 @@ class FormEngine {
'group' => array('size', 'autoSizeMax', 'max_size', 'show_thumbs', 'maxitems', 'minitems', 'disable_controls', 'readOnly'),
'inline' => array('appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly')
);
// Create instance of t3lib_TCEforms_inline only if this a non-IRRE-AJAX call:
// Create instance of \TYPO3\CMS\Backend\Form\Element\InlineElement only if this a non-IRRE-AJAX call:
if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement::') !== 0) {
$this->inline = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement');
}
// Create instance of t3lib_TCEforms_suggest only if this a non-Suggest-AJAX call:
// Create instance of \TYPO3\CMS\Backend\Form\Element\SuggestElement only if this a non-Suggest-AJAX call:
if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement::') !== 0) {
$this->suggest = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement');
}
......@@ -676,7 +674,9 @@ class FormEngine {
/**
* Based on the $table and $row of content, this displays the complete TCEform for the record.
* The input-$row is required to be preprocessed if necessary by eg. the t3lib_transferdata class. For instance the RTE content should be transformed through this class first.
* The input-$row is required to be preprocessed if necessary by eg.
* the \TYPO3\CMS\Backend\Form\DataPreprocessor class. For instance the RTE content
* should be transformed through this class first.
*
* @param string $table The table name
* @param array $row The record from the table for which to render a field.
......@@ -1322,7 +1322,7 @@ class FormEngine {
}
break;
default:
// Pair hook to the one in t3lib_TCEmain::checkValue_input_Eval()
// Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
$evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
$_params = array(
......@@ -1550,7 +1550,7 @@ function ' . $evalData . '(value) {
$this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
break;
default:
// Pair hook to the one in t3lib_TCEmain::checkValue_input_Eval() and t3lib_TCEmain::checkValue_text_Eval()
// Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval() and \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_text_Eval()
$evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
$_params = array(
......
......@@ -108,9 +108,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
public $adminPanel = NULL;
/**
* Class for frontend editing.
*
* @var t3lib_frontendedit
* @var \TYPO3\CMS\Core\FrontendEditing\FrontendEditingController
*/
public $frontendEdit = NULL;
......@@ -196,7 +194,6 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
* Used in the frontend.
*
* @return boolean Returns TRUE if access is OK
* @see typo3/init.php, t3lib_beuserauth::backendCheckLogin()
*/
public function checkBackendAccessSettingsFromInitPhp() {
// Check Hardcoded lock on BE
......@@ -215,7 +212,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
return FALSE;
}
}
// Finally a check from t3lib_beuserauth::backendCheckLogin()
// Finally a check from \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::backendCheckLogin()
if ($this->isUserAllowedToLogin()) {
return TRUE;
} else {
......
......@@ -25,13 +25,14 @@ namespace TYPO3\CMS\Backend\Module;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Parent class for 'Extension Objects' in backend modules.
*
* Used for 'submodules' to other modules. Also called 'Function menu modules'
* in t3lib_extMgm. And now its even called 'Extension Objects'. Or
* 'Module functions'. Wish we had just one name. Or a name at all...(?)
* Thank God its not so advanced when it works...
* in \TYPO3\CMS\Core\Utility\ExtensionManagementUtility. And now its even called
* 'Extension Objects'. Or 'Module functions'. Wish we had just one name. Or a
* name at all...(?) Thank God its not so advanced when it works...
*
* In other words this class is used for backend modules which is not true
* backend modules appearing in the menu but rather adds themselves as a new
......@@ -43,9 +44,10 @@ namespace TYPO3\CMS\Backend\Module;
* of the classname, script-path and a label (title/name).
*
* For more information about this, please see the large example comment for the
* class t3lib_SCbase. This will show the principle of a 'level-1' connection.
* The more advanced example - having two layers as it is done by the 'func_wizards'
* extension with the 'web_info' module - can be seen in the comment above.
* class \TYPO3\CMS\Backend\Module\BaseScriptClass. This will show the principle of a
* 'level-1' connection. The more advanced example - having two layers as it is done
* by the 'func_wizards' extension with the 'web_info' module - can be seen in the
* comment above.
*
* EXAMPLE: One level.
* This can be seen in the extension 'cms' where the info module have a
......@@ -99,13 +101,14 @@ namespace TYPO3\CMS\Backend\Module;
* But then again ->include_once is traversed IF the initialization of
* the level-1 modules might have added more files!!
* And after that $SOBE->checkSubExtObj() is called to initialize the second level.
*
* In this way even a third level could be supported - but most likely that is
* a too layered model to be practical.
*
* Anyways, the final interesting thing is to see what the framework
* "func_wizard" actually does:
*
* class tx_funcwizards_webfunc extends t3lib_extobjbase {
* class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
* var $localLangFile = "locallang.php";
* var $function_key = "wiz";
* function init(&$pObj, $conf) {
......@@ -119,14 +122,14 @@ namespace TYPO3\CMS\Backend\Module;
* }
* }
*
* Notice that the handleExternalFunctionValue of this class (t3lib_extobjbase)
* Notice that the handleExternalFunctionValue of this class
* is called and that the ->function_key internal var is set!
*
* The two level-2 sub-module "wizard_crpages" and "wizard_sortpages"
* are totally normal "submodules".
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
* @see t3lib_SCbase
* @see \TYPO3\CMS\Backend\Module\BaseScriptClass
* @see tx_funcwizards_webfunc::init()
* @see tx_funcwizards_webfunc
* @see tx_wizardsortpages_webfunc_2
......@@ -134,7 +137,8 @@ namespace TYPO3\CMS\Backend\Module;
abstract class AbstractFunctionModule {
/**
* Contains a reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
* Contains a reference to the parent (calling) object (which is probably an instance of
* an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass
*
* @var \TYPO3\CMS\Backend\Module\BaseScriptClass
* @see init()
......@@ -179,10 +183,12 @@ abstract class AbstractFunctionModule {
/**
* Initialize the object
*
* @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
* @param object $pObj A reference to the parent (calling) object (which is probably an instance of an
* extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass
*
* @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
* @return void
* @see t3lib_SCbase::checkExtObj()
* @see \TYPO3\CMS\Backend\Module\BaseScriptClass::checkExtObj()
* @todo Define visibility
*/
public function init(&$pObj, $conf) {
......@@ -232,10 +238,10 @@ abstract class AbstractFunctionModule {
}
/**
* Same as t3lib_SCbase::checkExtObj()
* Same as \TYPO3\CMS\Backend\Module\BaseScriptClass::checkExtObj()
*
* @return void
* @see t3lib_SCbase::checkExtObj()
* @see \TYPO3\CMS\Backend\Module\BaseScriptClass::checkExtObj()
* @todo Define visibility
*/
public function checkExtObj() {
......
......@@ -26,17 +26,13 @@ namespace TYPO3\CMS\Backend\Module;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Contains the parent class for 'ScriptClasses' in backend modules.
*
* Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
* Parent class for 'ScriptClasses' in backend modules.
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
/**
* EXAMPLE PROTOTYPE
*
* As for examples there are lots of them if you search for classes which extends 't3lib_SCbase'.
* As for examples there are lots of them if you search for classes which extends \TYPO3\CMS\Backend\Module\BaseScriptClass
* However you can see a prototype example of how a module might use this class in an index.php file typically hosting a backend module.
* NOTICE: This example only outlines the basic structure of how this class is used. You should consult the documentation and other real-world examples for some actual things to do when building modules.
*
......@@ -48,8 +44,9 @@ namespace TYPO3\CMS\Backend\Module;
* $GLOBALS['LANG']->includeLLFile('EXT:prototype/locallang.php');
* $GLOBALS['BE_USER']->modAccess($MCONF,1);
*
* SC_mod_prototype EXTENDS THE CLASS t3lib_SCbase with a main() and printContent() function:
* class SC_mod_prototype extends t3lib_SCbase {
* SC_mod_prototype EXTENDS THE CLASS \TYPO3\CMS\Backend\Module\BaseScriptClass with a main() and printContent() function:
*
* class SC_mod_prototype extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
* MAIN FUNCTION - HERE YOU CREATE THE MODULE CONTENT IN $this->content
* function main() {
* TYPICALLY THE INTERNAL VAR, $this->doc is instantiated like this:
......@@ -79,13 +76,8 @@ namespace TYPO3\CMS\Backend\Module;
* $SOBE->main();
* FINALLY THE printContent() FUNCTION WILL OUTPUT THE ACCUMULATED CONTENT
* $SOBE->printContent();
*/
/**
* Parent class for 'ScriptClasses' in backend modules.
* See example comment above.
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
* @see t3lib_extobjbase
*/
class BaseScriptClass {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment