IDs aller Unterseiten ermitteln


function getTreePids($parent = 0, $as_array = true){
$depth = 999999;
$queryGenerator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( 'TYPO3\\CMS\\Core\\Database\\QueryGenerator' );
$childPids = $queryGenerator->getTreeList($parent, $depth, 0, 1); //Will be a string like 1,2,3
if($as_array) {
$childPids = explode(',',$childPids );
}
return $childPids;
}

TYPO3 Hooks

Datahandler

CommandMap

$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['extkey'] = \Vendor\Extension\Hook\Commandmap::class;
public function processCmdmap_preProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processCmdmap_deleteAction($table, $id, $recordToDelete, $recordWasDeleted=NULL, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}

DataMap

$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['extkey'] = \Vendor\Extension\Hook\Datamap::class;
public function processDatamap_preProcessFieldArray(array &$fieldArray, $table, $id, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_postProcessFieldArray($status, $table, $id, array &$fieldArray, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_afterDatabaseOperations($status, $table, $id, array $fieldArray, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_afterAllOperations(\TYPO3\CMS\Core\DataHandling\DataHandler &;$pObj) {}

Language manager fails to update / Core update fails

Check if there´s a record in table „tx_extensionmanager_domain_model_repository“.

If there is no record run this statement:

INSERT INTO `tx_extensionmanager_domain_model_repository` (`uid`, `pid`, `title`, `description`, `wsdl_url`, `mirror_list_url`, `last_update`, `extension_count`) VALUES
(1, 0, 'TYPO3.org Main Repository', 'Main repository on typo3.org. This repository has some mirrors configured which are available with the mirror url.', 'https://typo3.org/wsdl/tx_ter_wsdl.php', 'https://repositories.typo3.org/mirrors.xml.gz', 0, 0);

Link to backend module

Build link to backend module


//Name of the module ($mainModuleName + '_' + $extensionName + $subModuleName)
$module_name = 'tools_GitsCacheStatus';
$url_parameters = array(
'tx_gitscache_tools_gitscachestatus' => array(
'controller' => 'Tag',
'action' => 'show',
'tag' => $tag
)
);
$uri = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl($module_name, $url_parameters);

IP address

Get IP address of a user behind a proxy like e.g. nginx or Varnish.


\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR');