Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
website-angular
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jonas Leder
website-angular
Commits
a4da0f00
Commit
a4da0f00
authored
Oct 14, 2022
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
add displayInNavigation and navigationTitle
parent
63f6dfa9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/migrations/Version20221014084151.php
+31
-0
31 additions, 0 deletions
api/migrations/Version20221014084151.php
api/src/Entity/Page.php
+30
-0
30 additions, 0 deletions
api/src/Entity/Page.php
with
61 additions
and
0 deletions
api/migrations/Version20221014084151.php
0 → 100644
+
31
−
0
View file @
a4da0f00
<?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'
);
}
}
This diff is collapsed.
Click to expand it.
api/src/Entity/Page.php
+
30
−
0
View file @
a4da0f00
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment