Upgrade to 3.2.0

This commit is contained in:
Bastian Allgeier
2019-06-25 09:56:08 +02:00
parent 9e18cf635d
commit 9c89153d35
296 changed files with 14408 additions and 2504 deletions

View File

@@ -16,7 +16,7 @@ use Kirby\Toolkit\View;
* Helper to create an asset object
*
* @param string $path
* @return Asset
* @return Kirby\Cms\Asset
*/
function asset(string $path)
{
@@ -44,7 +44,7 @@ function attr(array $attr = null, $before = null, $after = null)
* Returns the result of a collection by name
*
* @param string $name
* @return Collection|null
* @return Kirby\Cms\Collection|null
*/
function collection(string $name)
{
@@ -246,7 +246,7 @@ function html(string $string = null, bool $keepTags = false)
* <?= image('some/page/myimage.jpg') ?>
*
* @param string $path
* @return File|null
* @return Kirby\Cms\File|null
*/
function image(string $path = null)
{
@@ -382,9 +382,9 @@ function js($url, $options = null)
/**
* Returns the Kirby object in any situation
*
* @return App
* @return Kirby\Cms\App
*/
function kirby(): App
function kirby()
{
return App::instance();
}
@@ -527,7 +527,7 @@ function option(string $key, $default = null)
* id or the current page when no id is specified
*
* @param string|array ...$id
* @return Page|null
* @return Kirby\Cms\Page|null
*/
function page(...$id)
{
@@ -542,7 +542,7 @@ function page(...$id)
* Helper to build page collections
*
* @param string|array ...$id
* @return Pages
* @return Kirby\Cms\Pages
*/
function pages(...$id)
{
@@ -616,7 +616,7 @@ function timestamp(string $date = null, int $step = null): ?string
/**
* Returns the currrent site object
*
* @return Site
* @return Kirby\Cms\Site
*/
function site()
{
@@ -669,12 +669,12 @@ function smartypants(string $text = null): string
/**
* Embeds a snippet from the snippet folder
*
* @param string $name
* @param string|array $name
* @param array|object $data
* @param boolean $return
* @return string
*/
function snippet(string $name, $data = [], bool $return = false)
function snippet($name, $data = [], bool $return = false)
{
if (is_object($data) === true) {
$data = ['item' => $data];
@@ -742,6 +742,21 @@ function tc($key, int $count)
return I18n::translateCount($key, $count);
}
/**
* Translate by key and then replace
* placeholders in the text
*
* @param string $key
* @param string $fallback
* @param array $replace
* @param string $locale
* @return string
*/
function tt(string $key, $fallback = null, array $replace = null, string $locale = null)
{
return I18n::template($key, $fallback, $replace, $locale);
}
/**
* Builds a Twitter link
*