当前位置: 首页>>代码示例>>PHP>>正文


PHP ExtensionManagementUtility::extLoaded方法代码示例

本文整理汇总了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();
 }
开发者ID:rabe69,项目名称:mm_forum,代码行数:46,代码来源:class.tx_mmforum_postfactory.php


注:本文中的TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extLoaded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。