forked from laysense/laysite
Improve canvas layers, heading removal and component previews in 1.5.3
This commit is contained in:
@@ -260,10 +260,11 @@ final class Repository
|
||||
self::checkVersion($query->rowCount());
|
||||
}
|
||||
|
||||
public function createSection(string $page, string $key, string $title, string $style, string $body, ?string $feed = null, string $lead = ''): void
|
||||
public function createSection(string $page, string $key, string $title, string $style, string $body, ?string $feed = null, string $lead = '', ?string $template = null): void
|
||||
{
|
||||
Database::write(function (PDO $pdo) use ($page, $key, $title, $style, $body, $feed, $lead): void {
|
||||
self::insertSection($pdo, $page, $key, compact('title', 'style', 'body', 'feed', 'lead'));
|
||||
Database::write(function (PDO $pdo) use ($page, $key, $title, $style, $body, $feed, $lead, $template): void {
|
||||
$presentation = CanvasStyle::encode($template === null ? [] : ['template' => $template]);
|
||||
self::insertSection($pdo, $page, $key, compact('title', 'style', 'body', 'feed', 'lead', 'presentation'));
|
||||
self::touchPage($pdo, $page);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user