repositories

  1. LPH

    How To Grab a List of Latest Threads

    /** @var \XF\Repository\Thread $threadRepo */ $threadRepo = \XF::app()->repository('XF:Thread'); $threadFinder = $threadRepo->findThreadsWithLatestPosts(); dump($threadFinder); Next, you can do a loop to pull the threads foreach ($threads = $threadFinder->fetch() AS $threadId => $thread) {...
  2. LPH

    How To Grab a List of Nodes

    /** @var \XF\Repository\Node $nodeRepo */ $nodeRepo = \XF::app()->repository('XF:Node'); $nodeList = $nodeRepo->createNodeTree($nodeRepo->getFullNodeList()); dump($nodeList); Returns the following information: "node_id" => 1 "title" => "XenWord 4 Official Forums"...
Top