original_string: public function getMods()
      {
          $mods = Podium::getInstance()->podiumCache->getElement('forum.moderators', $this->id);
          if ($mods === false) {
              $mods = [];
              $modteam = User::find()->select(['id', 'role'])->where([
                      'status' => User::STATUS_ACTIVE,
                      'role' => [User::ROLE_ADMIN, User::ROLE_MODERATOR]
                  ]);
              foreach ($modteam->each() as $user) {
                  if ($user->role == User::ROLE_ADMIN) {
                      $mods[] = $user->id;
                      continue;
                  }
                  if ((new Query())->from(Mod::tableName())->where([
                          'forum_id' => $this->id, 'user_id' => $user->id
                      ])->exists()) {
                      $mods[] = $user->id;
                  }
              }
              Podium::getInstance()->podiumCache->setElement('forum.moderators', $this->id, $mods);
          }
          return $mods;
      }
code: public function getMods()
      {
          $mods = Podium::getInstance()->podiumCache->getElement('forum.moderators', $this->id);
          if ($mods === false) {
              $mods = [];
              $modteam = User::find()->select(['id', 'role'])->where([
                      'status' => User::STATUS_ACTIVE,
                      'role' => [User::ROLE_ADMIN, User::ROLE_MODERATOR]
                  ]);
              foreach ($modteam->each() as $user) {
                  if ($user->role == User::ROLE_ADMIN) {
                      $mods[] = $user->id;
                      continue;
                  }
                  if ((new Query())->from(Mod::tableName())->where([
                          'forum_id' => $this->id, 'user_id' => $user->id
                      ])->exists()) {
                      $mods[] = $user->id;
                  }
              }
              Podium::getInstance()->podiumCache->setElement('forum.moderators', $this->id, $mods);
          }
          return $mods;
      }
code_tokens: public function getMods ( ) { $ mods = Podium :: getInstance ( ) -> podiumCache -> getElement ( 'forum.moderators' , $ this -> id ) ; if ( $ mods === false ) { $ mods = [ ] ; $ modteam = User :: find ( ) -> select ( [ 'id' , 'role' ] ) -> where ( [ 'status' => User :: STATUS_ACTIVE , 'role' => [ User :: ROLE_ADMIN , User :: ROLE_MODERATOR ] ] ) ; foreach ( $ modteam -> each ( ) as $ user ) { if ( $ user -> role == User :: ROLE_ADMIN ) { $ mods [ ] = $ user -> id ; continue ; } if ( ( new Query ( ) ) -> from ( Mod :: tableName ( ) ) -> where ( [ 'forum_id' => $ this -> id , 'user_id' => $ user -> id ] ) -> exists ( ) ) { $ mods [ ] = $ user -> id ; } } Podium :: getInstance ( ) -> podiumCache -> setElement ( 'forum.moderators' , $ this -> id , $ mods ) ; } return $ mods ; }
docstring: Returns list of moderators for this forum.
  @return int[]
docstring_tokens: Returns list of moderators for this forum .