original_string: public function podiumDelete()
      {
          $transaction = static::getDb()->beginTransaction();
          try {
              if (!Podium::getInstance()->db->createCommand()->delete('{{%podium_poll_vote}}', ['poll_id' => $this->id])->execute()) {
                  throw new Exception('Poll Votes deleting error!');
              }
              if (!PollAnswer::deleteAll(['poll_id' => $this->id])) {
                  throw new Exception('Poll Answers deleting error!');
              }
              if (!$this->delete()) {
                  throw new Exception('Poll deleting error!');
              }
              $transaction->commit();
              Log::info('Poll deleted', !empty($this->id) ? $this->id : '', __METHOD__);
              return true;
          } catch (Exception $e) {
              $transaction->rollBack();
              Log::error($e->getMessage(), null, __METHOD__);
          }
          return false;
      }
code: public function podiumDelete()
      {
          $transaction = static::getDb()->beginTransaction();
          try {
              if (!Podium::getInstance()->db->createCommand()->delete('{{%podium_poll_vote}}', ['poll_id' => $this->id])->execute()) {
                  throw new Exception('Poll Votes deleting error!');
              }
              if (!PollAnswer::deleteAll(['poll_id' => $this->id])) {
                  throw new Exception('Poll Answers deleting error!');
              }
              if (!$this->delete()) {
                  throw new Exception('Poll deleting error!');
              }
              $transaction->commit();
              Log::info('Poll deleted', !empty($this->id) ? $this->id : '', __METHOD__);
              return true;
          } catch (Exception $e) {
              $transaction->rollBack();
              Log::error($e->getMessage(), null, __METHOD__);
          }
          return false;
      }
code_tokens: public function podiumDelete ( ) { $ transaction = static :: getDb ( ) -> beginTransaction ( ) ; try { if ( ! Podium :: getInstance ( ) -> db -> createCommand ( ) -> delete ( '{{%podium_poll_vote}}' , [ 'poll_id' => $ this -> id ] ) -> execute ( ) ) { throw new Exception ( 'Poll Votes deleting error!' ) ; } if ( ! PollAnswer :: deleteAll ( [ 'poll_id' => $ this -> id ] ) ) { throw new Exception ( 'Poll Answers deleting error!' ) ; } if ( ! $ this -> delete ( ) ) { throw new Exception ( 'Poll deleting error!' ) ; } $ transaction -> commit ( ) ; Log :: info ( 'Poll deleted' , ! empty ( $ this -> id ) ? $ this -> id : '' , __METHOD__ ) ; return true ; } catch ( Exception $ e ) { $ transaction -> rollBack ( ) ; Log :: error ( $ e -> getMessage ( ) , null , __METHOD__ ) ; } return false ; }
docstring: Performs poll delete with answers and votes.
  @return bool
docstring_tokens: Performs poll delete with answers and votes .