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

@@ -237,7 +237,7 @@ class Page extends ModelWithContent
/**
* Returns an array with all blueprints that are available for the page
*
* @param string $inSection
* @param string|null $inSection
* @return array
*/
public function blueprints(string $inSection = null): array
@@ -302,7 +302,7 @@ class Page extends ModelWithContent
*
* @internal
* @param array $data
* @param string $languageCode
* @param string|null $languageCode
* @return array
*/
public function contentFileData(array $data, string $languageCode = null): array
@@ -318,7 +318,7 @@ class Page extends ModelWithContent
* which is found by the inventory method
*
* @internal
* @param string $languageCode
* @param string|null $languageCode
* @return string
*/
public function contentFileName(string $languageCode = null): string
@@ -333,6 +333,7 @@ class Page extends ModelWithContent
* @param array $data
* @param string $contentType
* @return array
* @throws \Kirby\Exception\InvalidArgumentException If the controller returns invalid objects for `kirby`, `site`, `pages` or `page`
*/
public function controller($data = [], $contentType = 'html'): array
{
@@ -432,22 +433,21 @@ class Page extends ModelWithContent
* gets dragged onto a textarea
*
* @internal
* @param string $type (null|auto|kirbytext|markdown)
* @param string|null $type (null|auto|kirbytext|markdown)
* @return string
*/
public function dragText(string $type = null): string
{
$type = $type ?? 'auto';
$type = $this->dragTextType($type);
if ($type === 'auto') {
$type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown';
if ($dragTextFromCallback = $this->dragTextFromCallback($type)) {
return $dragTextFromCallback;
}
switch ($type) {
case 'markdown':
return '[' . $this->title() . '](' . $this->url() . ')';
default:
return '(link: ' . $this->id() . ' text: ' . $this->title() . ')';
if ($type === 'markdown') {
return '[' . $this->title() . '](' . $this->url() . ')';
} else {
return '(link: ' . $this->id() . ' text: ' . $this->title() . ')';
}
}
@@ -757,6 +757,7 @@ class Page extends ModelWithContent
/**
* @deprecated 3.0.0 Use `Page::isUnlisted()` instead
* @return bool
* @codeCoverageIgnore
*/
public function isInvisible(): bool
{
@@ -848,6 +849,7 @@ class Page extends ModelWithContent
/**
* @deprecated 3.0.0 Use `Page::isListed()` instead
* @return bool
* @codeCoverageIgnore
*/
public function isVisible(): bool
{
@@ -861,7 +863,7 @@ class Page extends ModelWithContent
* This is only used for drafts so far.
*
* @internal
* @param string $token
* @param string|null $token
* @return bool
*/
public function isVerified(string $token = null)
@@ -926,7 +928,7 @@ class Page extends ModelWithContent
/**
* Returns the last modification date of the page
*
* @param string $format
* @param string|null $format
* @param string|null $handler
* @param string|null $languageCode
* @return int|string
@@ -955,7 +957,7 @@ class Page extends ModelWithContent
* according to the blueprint settings
*
* @internal
* @param array $params
* @param array|null $params
* @return array
*/
public function panelIcon(array $params = null): array
@@ -1158,8 +1160,8 @@ class Page extends ModelWithContent
*
* @param array $data
* @param string $contentType
* @param int $code
* @return string
* @throws \Kirby\Exception\NotFoundException If the default template cannot be found
*/
public function render(array $data = [], $contentType = 'html'): string
{
@@ -1218,6 +1220,7 @@ class Page extends ModelWithContent
* @internal
* @param mixed $type
* @return \Kirby\Cms\Template
* @throws \Kirby\Exception\NotFoundException If the content representation cannot be found
*/
public function representation($type)
{
@@ -1258,7 +1261,7 @@ class Page extends ModelWithContent
/**
* Search all pages within the current page
*
* @param string $query
* @param string|null $query
* @param array $params
* @return \Kirby\Cms\Pages
*/
@@ -1288,7 +1291,7 @@ class Page extends ModelWithContent
* more reliable in connection with the inventory
* than computing the dirname afterwards
*
* @param string $dirname
* @param string|null $dirname
* @return self
*/
protected function setDirname(string $dirname = null)
@@ -1312,7 +1315,7 @@ class Page extends ModelWithContent
/**
* Sets the sorting number
*
* @param int $num
* @param int|null $num
* @return self
*/
protected function setNum(int $num = null)
@@ -1360,7 +1363,7 @@ class Page extends ModelWithContent
/**
* Sets the intended template
*
* @param string $template
* @param string|null $template
* @return self
*/
protected function setTemplate(string $template = null)
@@ -1375,7 +1378,7 @@ class Page extends ModelWithContent
/**
* Sets the Url
*
* @param string $url
* @param string|null $url
* @return self
*/
protected function setUrl(string $url = null)
@@ -1570,8 +1573,8 @@ class Page extends ModelWithContent
* Builds the Url for a specific language
*
* @internal
* @param string $language
* @param array $options
* @param string|null $language
* @param array|null $options
* @return string
*/
public function urlForLanguage($language = null, array $options = null): string