Upgrade to 3.4.3

This commit is contained in:
Bastian Allgeier
2020-09-15 10:25:09 +02:00
parent 54b9ba3047
commit d8e797dd9b
108 changed files with 1750 additions and 523 deletions

View File

@@ -140,6 +140,17 @@ class Site extends ModelWithContent
]);
}
/**
* Makes it possible to convert the site model
* to a string. Mostly useful for debugging
*
* @return string
*/
public function __toString(): string
{
return $this->url();
}
/**
* Returns the url to the api endpoint
*
@@ -170,32 +181,6 @@ class Site extends ModelWithContent
return $this->blueprint = SiteBlueprint::factory('site', null, $this);
}
/**
* Returns an array with all blueprints that are available
* as subpages of the site
*
* @param string $inSection
* @return array
*/
public function blueprints(string $inSection = null): array
{
$blueprints = [];
$blueprint = $this->blueprint();
$sections = $inSection !== null ? [$blueprint->section($inSection)] : $blueprint->sections();
foreach ($sections as $section) {
if ($section === null) {
continue;
}
foreach ((array)$section->blueprints() as $blueprint) {
$blueprints[$blueprint['name']] = $blueprint;
}
}
return array_values($blueprints);
}
/**
* Builds a breadcrumb collection
*
@@ -220,7 +205,7 @@ class Site extends ModelWithContent
*
* @internal
* @param array $data
* @param string $languageCode
* @param string|null $languageCode
* @return array
*/
public function contentFileData(array $data, string $languageCode = null): array
@@ -391,7 +376,7 @@ class Site extends ModelWithContent
* prop, the home page will be returned if
* it can be found. (see `Site::homePage()`)
*
* @param string $path
* @param string|null $path
* @return \Kirby\Cms\Page|null
*/
public function page(string $path = null)
@@ -507,7 +492,7 @@ class Site extends ModelWithContent
/**
* Search all pages in the site
*
* @param string $query
* @param string|null $query
* @param array $params
* @return \Kirby\Cms\Pages
*/
@@ -578,7 +563,7 @@ class Site extends ModelWithContent
/**
* Sets the Url
*
* @param string $url
* @param string|null $url
* @return self
*/
protected function setUrl($url = null)
@@ -626,8 +611,8 @@ class Site extends ModelWithContent
* Returns the translated url
*
* @internal
* @param string $languageCode
* @param array $options
* @param string|null $languageCode
* @param array|null $options
* @return string
*/
public function urlForLanguage(string $languageCode = null, array $options = null): string