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

Major improvements to InputfieldDateTime including a significant refactoring, adding support for HTML5 date/time input types, and a new date selection input using separate selects for month, day and year

This commit is contained in:
Ryan Cramer
2020-03-06 14:04:17 -05:00
parent de5b7d9207
commit 15793931f4
10 changed files with 1566 additions and 322 deletions

View File

@@ -165,6 +165,23 @@ class PageArray extends PaginatedArray implements WirePaginatable {
public function makeBlankItem() {
return $this->wire('pages')->newPage();
}
/**
* Creates a new blank instance of this PageArray, for internal use.
*
* #pw-internal
*
* @return PageArray
*
*/
public function makeNew() {
$class = get_class($this);
/** @var PageArray $newArray */
$newArray = $this->wire(new $class());
// $newArray->finderOptions($this->finderOptions());
if($this->lazyLoad) $newArray->_lazy(true);
return $newArray;
}
/**
* Import the provided pages into this PageArray.
@@ -651,12 +668,12 @@ class PageArray extends PaginatedArray implements WirePaginatable {
*
* #pw-internal
*
* @param array $options
* @param array|null $options Specify array to set or omit this argument to get
* @return array
*
*/
public function finderOptions(array $options = array()) {
$this->finderOptions = $options;
public function finderOptions($options = null) {
if(is_array($options)) $this->finderOptions = $options;
return $this->finderOptions;
}