Showing 7 of 1,975 result(s)
…he input.txt with the following value: where(name, =, value)|is:published(true) We will add a new condition to our parser that checks if the current token is the TOKEN_FILTER_DELIMITER token; if it is, we will reset our current values and move on...
This was a tough question for me to answer at first: if I rebuilt my site exactly as it was, I would be able to complete the project much faster, but I would ultimately be unhappy with the end result. On the other hand, if I rebuilt the site...
…ent queries (i.e., more than one, collection, tag), Array plucking and the, offset, modifier, Using the, offset, and, limit, modifiers We could utilize multiple collection tags to retrieve the first article separately from the remaining two like...
sum($callback = null) The sum is a simple method that returns the sum of all items in a collection. It also defines a $callback parameter which can be used to tell the sum method which values of the collection should be added together. If no items...
The has method determines if a translation exists. It accepts a $key , which corresponds to an array key within the translation group file, i.e., user . The method also accepts a $locale , which can be used to determine if a given key exists for a...
…u have basic knowledge of HTML and CSS (they have done a great job of abstracting the PHP side of things away). The template engine, Antlers, is also very capable and similar to Twig (if you come from a Symfony background). It does have its...
…ntime. This is a technique that comes up every now and then, and most often within the context of fetching dynamic alt text for images based on the current locale. Let's assume we have the following variables available to us: we could access any...