本文整理匯總了PHP中TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extLoaded方法的典型用法代碼示例。如果您正苦於以下問題:PHP ExtensionManagementUtility::extLoaded方法的具體用法?PHP ExtensionManagementUtility::extLoaded怎麽用?PHP ExtensionManagementUtility::extLoaded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Utility\ExtensionManagementUtility
的用法示例。
在下文中一共展示了ExtensionManagementUtility::extLoaded方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: intval
/**
*
* Deletes a topic from the database.
* This function completely deletes a topic and all associated objects (like
* ratings, subscriptions, etc.). Before deleting the topic itself, all posts
* are deleted using the "delete_post" method.
*
* @author Martin Helmich <m.helmich@mittwald.de>
* @version 2009-12-20
* @param int $topicId The UID of the topic that is to be deleted
* @return void
*/
function delete_topic($topicId)
{
/*
* Load the topic from the database.
*/
$arr = $this->databaseHandle->sql_fetch_assoc($this->databaseHandle->exec_SELECTquery('*', 'tx_mmforum_topics', 'uid=' . intval($topicId)));
$uA = array('deleted' => 1, 'tstamp' => $GLOBALS['EXEC_TIME']);
/*
* Load all posts of this topic and delete them all.
*/
$res = $this->databaseHandle->exec_SELECTquery('uid', 'tx_mmforum_posts', 'topic_id=' . intval($topicId) . ' AND deleted=0');
while (list($postId) = $this->databaseHandle->sql_fetch_row($res)) {
$this->delete_post($postId, true);
}
/*
* Now delete all favorites, subscriptions, ratings and search index entries.
*/
$this->databaseHandle->exec_UPDATEquery('tx_mmforum_favorites', $uA, 'topic_id=' . intval($postId));
$this->databaseHandle->exec_UPDATEquery('tx_mmforum_havealook', $uA, 'topic_id=' . intval($postId));
$this->databaseHandle->exec_DELETEquery('tx_mmforum_wordmatch', 'topic_id=' . intval($topicId) . '');
if (ExtensionManagementUtility::extLoaded('ratings')) {
$this->databaseHandle->exec_DELETEquery('tx_ratings_data', $uA, 'reference="tx_mmforum_topics_' . intval($postId) . '"');
}
/*
* Congratulations. Now delete the topic itself.
*/
$this->databaseHandle->exec_UPDATEquery('tx_mmforum_topics', $uA, 'uid=' . intval($postId));
/*
* Now update all the internal counters.
*/
$this->updateQueue_addForum($arr['forum_id']);
$this->updateQueue_addUser($arr['topic_poster']);
$this->updateQueue_process();
}