Upgrade to rc5
This commit is contained in:
@@ -74,7 +74,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function audio()
|
||||
{
|
||||
return $this->files()->filterBy('type', 'audio');
|
||||
return $this->files()->filter('type', 'audio');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function code()
|
||||
{
|
||||
return $this->files()->filterBy('type', 'code');
|
||||
return $this->files()->filter('type', 'code');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function documents()
|
||||
{
|
||||
return $this->files()->filterBy('type', 'document');
|
||||
return $this->files()->filter('type', 'document');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -319,7 +319,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function images()
|
||||
{
|
||||
return $this->files()->filterBy('type', 'image');
|
||||
return $this->files()->filter('type', 'image');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -351,19 +351,6 @@ class Pages extends Collection
|
||||
return $this->index;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.0.0 Use `Pages::unlisted()` instead
|
||||
*
|
||||
* @return self
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function invisible()
|
||||
{
|
||||
deprecated('$pages->invisible() is deprecated, use $pages->unlisted() instead. $pages->invisible() will be removed in Kirby 3.5.0.');
|
||||
|
||||
return $this->unlisted();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all listed pages in the collection
|
||||
*
|
||||
@@ -371,7 +358,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function listed()
|
||||
{
|
||||
return $this->filterBy('isListed', '==', true);
|
||||
return $this->filter('isListed', '==', true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -381,7 +368,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function unlisted()
|
||||
{
|
||||
return $this->filterBy('isUnlisted', '==', true);
|
||||
return $this->filter('isUnlisted', '==', true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -478,7 +465,7 @@ class Pages extends Collection
|
||||
*/
|
||||
public function published()
|
||||
{
|
||||
return $this->filterBy('isDraft', '==', false);
|
||||
return $this->filter('isDraft', '==', false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -509,19 +496,6 @@ class Pages extends Collection
|
||||
*/
|
||||
public function videos()
|
||||
{
|
||||
return $this->files()->filterBy('type', 'video');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.0.0 Use `Pages::listed()` instead
|
||||
*
|
||||
* @return \Kirby\Cms\Pages
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function visible()
|
||||
{
|
||||
deprecated('$pages->visible() is deprecated, use $pages->listed() instead. $pages->visible() will be removed in Kirby 3.5.0.');
|
||||
|
||||
return $this->listed();
|
||||
return $this->files()->filter('type', 'video');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user