Skip to content
Snippets Groups Projects
Commit a4da0f00 authored by Jonas Leder's avatar Jonas Leder
Browse files

add displayInNavigation and navigationTitle

parent 63f6dfa9
Branches
Tags
No related merge requests found
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221014084151 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE page ADD display_in_navigation TINYINT(1) NOT NULL, ADD navigation_title VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE page DROP display_in_navigation, DROP navigation_title');
}
}
......@@ -26,6 +26,12 @@ class Page
#[ORM\Column(length: 255)]
private ?string $contentType = null;
#[ORM\Column]
private ?bool $displayInNavigation = true;
#[ORM\Column(length: 255, nullable: true)]
private ?string $navigationTitle = null;
public function getId(): ?int
{
return $this->id;
......@@ -78,4 +84,28 @@ class Page
return $this;
}
public function isDisplayInNavigation(): ?bool
{
return $this->displayInNavigation;
}
public function setDisplayInNavigation(bool $displayInNavigation): self
{
$this->displayInNavigation = $displayInNavigation;
return $this;
}
public function getNavigationTitle(): ?string
{
return $this->navigationTitle;
}
public function setNavigationTitle(?string $navigationTitle): self
{
$this->navigationTitle = $navigationTitle;
return $this;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment