本文整理汇总了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();
}