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

@@ -5,9 +5,21 @@ namespace Kirby\Cms;
/**
* Extension of the basic blueprint class
* to handle the blueprint for the site.
*
* @package Kirby Cms
* @author Bastian Allgeier <bastian@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://getkirby.com/license
*/
class SiteBlueprint extends Blueprint
{
/**
* Creates a new page blueprint object
* with the given props
*
* @param array $props
*/
public function __construct(array $props)
{
parent::__construct($props);
@@ -26,4 +38,23 @@ class SiteBlueprint extends Blueprint
]
);
}
/**
* Returns the preview settings
* The preview setting controlls the "Open"
* button in the panel and redirects it to a
* different URL if necessary.
*
* @return string|boolean
*/
public function preview()
{
$preview = $this->props['options']['preview'] ?? true;
if (is_string($preview) === true) {
return $this->model->toString($preview);
}
return $preview;
}
}