original_string: public function podiumDelete()
      {
          $transaction = Thread::getDb()->beginTransaction();
          try {
              if (!$this->delete()) {
                  throw new Exception('Thread deleting error!');
              }
              $this->forum->updateCounters([
                  'threads' => -1,
                  'posts'   => -$this->postsCount
              ]);
              $transaction->commit();
              PodiumCache::clearAfter('threadDelete');
              Log::info('Thread deleted', $this->id, __METHOD__);
              return true;
          } catch (Exception $e) {
              $transaction->rollBack();
              Log::error($e->getMessage(), null, __METHOD__);
          }
          return false;
      }
code: public function podiumDelete()
      {
          $transaction = Thread::getDb()->beginTransaction();
          try {
              if (!$this->delete()) {
                  throw new Exception('Thread deleting error!');
              }
              $this->forum->updateCounters([
                  'threads' => -1,
                  'posts'   => -$this->postsCount
              ]);
              $transaction->commit();
              PodiumCache::clearAfter('threadDelete');
              Log::info('Thread deleted', $this->id, __METHOD__);
              return true;
          } catch (Exception $e) {
              $transaction->rollBack();
              Log::error($e->getMessage(), null, __METHOD__);
          }
          return false;
      }
code_tokens: public function podiumDelete ( ) { $ transaction = Thread :: getDb ( ) -> beginTransaction ( ) ; try { if ( ! $ this -> delete ( ) ) { throw new Exception ( 'Thread deleting error!' ) ; } $ this -> forum -> updateCounters ( [ 'threads' => - 1 , 'posts' => - $ this -> postsCount ] ) ; $ transaction -> commit ( ) ; PodiumCache :: clearAfter ( 'threadDelete' ) ; Log :: info ( 'Thread deleted' , $ this -> id , __METHOD__ ) ; return true ; } catch ( Exception $ e ) { $ transaction -> rollBack ( ) ; Log :: error ( $ e -> getMessage ( ) , null , __METHOD__ ) ; } return false ; }
docstring: Performs thread delete with parent forum counters update.
  @return bool
  @since 0.2
docstring_tokens: Performs thread delete with parent forum counters update .