Upgrade to 3.5.5

This commit is contained in:
Bastian Allgeier
2021-05-11 11:55:32 +02:00
parent de3560f3d6
commit efeff45192
146 changed files with 2008 additions and 1075 deletions

View File

@@ -3,6 +3,7 @@
namespace Kirby\Cms;
use Kirby\Exception\InvalidArgumentException;
use Kirby\Toolkit\Str;
use Throwable;
/**
@@ -86,6 +87,10 @@ class Block extends Item
/**
* Deprecated method to return the block type
*
* @deprecated 3.5.0 Use `\Kirby\Cms\Block::type()` instead
* @todo Add deprecated() helper warning in 3.6.0
* @todo Remove in 3.7.0
*
* @return string
*/
public function _key(): string
@@ -96,6 +101,10 @@ class Block extends Item
/**
* Deprecated method to return the block id
*
* @deprecated 3.5.0 Use `\Kirby\Cms\Block::id()` instead
* @todo Add deprecated() helper warning in 3.6.0
* @todo Remove in 3.7.0
*
* @return string
*/
public function _uid(): string
@@ -131,6 +140,19 @@ class Block extends Item
];
}
/**
* Converts the block to HTML and then
* uses the Str::excerpt method to create
* a non-formatted, shortened excerpt from it
*
* @param mixed ...$args
* @return string
*/
public function excerpt(...$args)
{
return Str::excerpt($this->toHtml(), ...$args);
}
/**
* Checks if the block is empty
*