Ejemplo n.º 1
0
 /**
  * Get all forums.
  *
  * @return mixed
  */
 public function all()
 {
     if (($forums = $this->cache->get('forums.all')) == null) {
         $forums = $this->decoratedRepository->all();
         $this->cache->forever('forums.all', $forums);
     }
     return $forums;
 }
Ejemplo n.º 2
0
 /**
  * @return RenderableInterface[]
  */
 public function fields()
 {
     $forums = $this->forumRepository->all();
     $options = [];
     foreach ($forums as $forum) {
         $options[$forum->id] = $forum->title;
     }
     return [(new Field('select', 'forum_id', trans('moderation.move_topic_forum_id_name'), trans('moderation.move_topic_forum_id_description')))->setOptions($options)];
 }