1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 00:37:02 +02:00

28 Commits

Author SHA1 Message Date
Ryan Cramer
9db14e6aef Fix issue processwire/processwire-issues#1915 using fix suggested from @michaellenaghan 2025-01-05 11:57:02 -05:00
Ryan Cramer
1c5f2f7e3c Updates for PHP 8.4 support per processwire/processwire-issues#2000 Also note that these changes require we adjust our minimum required PHP version from 7.0 up to 7.1, with PHP 8.x still recommended. 2024-11-29 13:29:28 -05:00
Ryan Cramer
bae44f93ce Update Page::editUrl() method to support a 'vars' (array) option that contains additional query string variables that it should bundle in to returned URL 2024-05-03 13:48:32 -04:00
Ryan Cramer
3e323e5f2f Add the FieldtypeDoesVersions interface for Fieldtypes that support handling versions of their own page data 2023-12-08 13:39:48 -05:00
Ryan Cramer
fbf2f140a7 Fix issue processwire/processwire-issues#1804 2023-09-01 09:30:56 -04:00
Ryan Cramer
ad4e359bca Major refactor of base Page class, moving a lot of code into a separate PageValues class, reducing the size of the base Page class. Also added new options for the get() method including full support of dot syntax (regardless of output formatting state) (i.e. "field_name.subfield_name.title") and support for brackets[] to force multi-value (i.e. "field_name[]") , indexes (i.e. field_name[0] to get first item), and bracketed selectors (i.e. "some_multi_value_field[title%=design]") and the ability to combine any of these. 2022-09-02 13:14:35 -04:00
Ryan Cramer
ee64e114f2 Add “#[\ReturnTypeWillChange]” comments to all InteratorAggregate, Countable and PDOStatement interface classes to stop PHP 8.1 notices per https://php.watch/versions/8.1/internal-method-return-types and processwire/processwire-issues#1467 ... someday when all PHP 5.x support can be dropped these will be converted to PHP 7.1+ return types 2021-12-31 09:19:09 -05:00
Ryan Cramer
3cf1ba5cab Various updates primarily aimed at simplifying the check for presence of LanguageSupportPageNames module 2021-10-04 11:13:25 -04:00
Ryan Cramer
5ac7c127eb Fix issue processwire/processwire-issues#1349 2021-08-17 10:55:53 -04:00
Ryan Cramer
4167f17235 Various minor optimizations to Page class and its helper classes 2021-07-02 12:32:04 -04:00
Ryan Cramer
5a5d4e5830 Add support for scheme and host to be manually specified in $page->url() and $page->httpUrl() methods in $options array argument. This is related to the request in PR #116 2021-05-13 09:56:48 -04:00
Ryan Cramer
956ad5e201 Add support for custom LanguagePage classes per feature request in processwire/processwire-issues#1246 2020-09-14 09:48:21 -04:00
Ryan Cramer
9add4e5f82 Add support for $page->parents(true); which returns parents in reverse order (closest to furthest) rather than breadcrumb order. 2020-05-29 14:14:30 -04:00
Ryan Cramer
e6551c9b4f Minor improvements to $page->url() method options for URL segments and pagination numbers. 2020-04-24 13:00:08 -04:00
Ryan Cramer
3717224a5c Fix issue processwire/processwire-issues#1041 2019-12-03 10:44:23 -05:00
Ryan Cramer
3e690b8ea4 Update phpdoc @return statement for Page::index() 2018-12-07 10:15:32 -05:00
Ryan Cramer
af0afe9f95 Additional updates for processwire/processwire-issues#751 plus some enhancements to PageFinder 2018-12-07 09:57:07 -05:00
Ryan Cramer
0dc8766491 Fix issue processwire/processwire-issues#751 with Page::index() not working for hidden/unpublished pages 2018-12-06 14:05:17 -05:00
Ryan Cramer
d7b7acb8e5 Various minor adjustments and bump version to 3.0.120 2018-11-30 13:52:24 -05:00
Ryan Cramer
7331bac132 Addition of a $page->numParents() method/property which reflects the number of parents the page has, aka depth in the tree. This commit also has several small adjustments and fixes, including a fix for the issue introduced last week that caused issues with WireArray in versions of PHP prior to 7.x 2018-10-26 12:18:46 -04:00
Ryan Cramer
8e22bee1b5 Fix issue processwire/processwire-issues#716 where $page traversal methods like next() and prev() were not working on RepeaterPage items 2018-10-05 09:48:20 -04:00
Ryan Cramer
5fddd95b43 Add new Page::numDescendants() method and property, plus descendants() and descendant() alias methods. Add Page::findOne() method. Update ProcessPageList with the ability to customize what is shown in the numChildren/count shown for each Page, along with the ability to display the the newly added Page descendants numbers instead of or in addition to the Page numChildren. 2018-10-05 08:11:16 -04:00
Ryan Cramer
54fad20ffd Add new Page methods: $page->links() which returns PageArray of other pages linking to it; $page->references() which returns PageArray of other pages referencing it in Page fields; $page->urls() which returns array of all URLs that can refer to the page, in all languages, and including both previous and current URLs. Plus add these properties: $page->references; $page->links; $page->numLinks; $page->numReferences; $page->hasLinks; $page->hasReferences; $page->referencing; $page->urls; see phpdoc for details on these properties. 2018-06-28 12:49:27 -04:00
Ryan Cramer
d7d392fe95 Fix issue #187 where $page->httpUrl didn't respect Template::slashUrls==0 setting when used in non-multi-language. 2017-03-07 08:49:28 -05:00
Ryan Cramer
e14d52f722 Add new $pages API methods: findIDs(), sort(), insertAfter, insertBefore(). Add support for negative "limit" and "start" values in selectors, where negative values reference the end of the set rather than the beginning. Add support for "eq=n" (or alias "index=n") selectors (both WireArray and PageFinder) for pulling a specific n'th item, can also specify "first" or "last" for "n". Update $page->editUrl(true) method to force return of edit URL with scheme and hostname. 2016-12-23 12:18:58 -05:00
Ryan Cramer
2b9a7adbcb Update to allow for Page objects to load pages (children, parent, etc.) that don't get cached when their load option specified cache=false. Also makes the 'parent' page lazy loading for Page objects, so that it doesn't load the parent Page until a $page->parent() call is requested. Updates for @apeisa / Avoine request. 2016-12-14 11:02:32 -05:00
Ryan Cramer
707cd9e735 Expand upon the Page::url() method to include an $options argument that adds many new capabilities. 2016-12-02 10:38:49 -05:00
Ryan Cramer
bac5b0de5d Initial commit to new repo (carried over from: https://github.com/ryancramerdesign/ProcessWire/tree/devns) 2016-09-02 14:55:17 -04:00