WireArray::getPrev() method

Given an item, get the item before it in the WireArray

Usage

// basic usage
$wire = $wireArray->getPrev(Wire $item);

// usage with all arguments
$wire = $wireArray->getPrev(Wire $item, bool $strict = true);

Arguments

NameType(s)Description
itemWire
strict (optional)bool

If false, string comparison will be used rather than exact instance comparison.

Return value

Wire null

Returns item that comes before given item, or null if not found


WireArray methods and properties

API reference based on ProcessWire core version 3.0.148

Twitter updates

  • This week we’ve got a few new and interesting core updates in progress, though none quite ready to release just yet. So rather than releasing version 3.0.154 today, I thought we'd instead take a brief look at what’s coming over the next few weeks… More
    3 April 2020
  • ProcessWire 3.0.153 (dev) focuses on comments field updates, significant refactoring/improvements to ProcessWire’s core Template class and PagesLoader class (which is used by the pages API variable), and we introduce a useful new pages API method— More
    20 March 2020
  • ProcessWire 3.0.152 core updates— This week we have some major improvements to our core date/time Inputfield, as well as a new ability to specify your own custom classes for Page objects— More
    6 March 2020

Latest news

  • ProcessWire Weekly #308
    In the 308th issue of ProcessWire Weekly we're going to take a look at some upcoming core and pro module updates, check out two all-new third party modules, and more. Read on!
    Weekly.pw / 4 April 2020
  • ProcessWire updates and additions in progress
    This week we’ve got a few new and interesting core updates in progress, though none quite ready to release just yet. So rather than releasing version 3.0.154 today, I thought we'd instead take a brief look at what’s coming over the next few weeks. This post covers all the details.
    Blog / 3 April 2020
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani