Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TypoScript-Backend
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TYPO3
TypoScript-Backend
Commits
f6958ea1
Commit
f6958ea1
authored
9 years ago
by
damjan
Browse files
Options
Downloads
Patches
Plain Diff
[FEATURE] MinVersion is not null and lowest value = 4.5
parent
8bcd9ecc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/SGalinski/TypoScriptBackendBundle/Entity/Property.php
+6
-1
6 additions, 1 deletion
src/SGalinski/TypoScriptBackendBundle/Entity/Property.php
src/SGalinski/TypoScriptBackendBundle/Entity/Type.php
+8
-4
8 additions, 4 deletions
src/SGalinski/TypoScriptBackendBundle/Entity/Type.php
with
14 additions
and
5 deletions
src/SGalinski/TypoScriptBackendBundle/Entity/Property.php
+
6
−
1
View file @
f6958ea1
...
...
@@ -4,6 +4,7 @@ namespace SGalinski\TypoScriptBackendBundle\Entity;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Symfony\Component\Validator\Constraints
as
Assert
;
/**
* Property
...
...
@@ -51,7 +52,11 @@ class Property {
* @var string The TYPO3 version in which the property was introduced
* Example: "4.5" "6.1" "6.2"), NULL is default and NULL is interpreted as most early version.
*
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=true)
* @Assert\Range(
* min = 4.5,
* minMessage = "Lowest supported version is {{ limit }}.",
* )
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=false)
*/
private
$minVersion
=
Type
::
MIN_VERSION_DEFAULT
;
...
...
This diff is collapsed.
Click to expand it.
src/SGalinski/TypoScriptBackendBundle/Entity/Type.php
+
8
−
4
View file @
f6958ea1
...
...
@@ -4,6 +4,7 @@ namespace SGalinski\TypoScriptBackendBundle\Entity;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Symfony\Component\Validator\Constraints
as
Assert
;
/**
* Type
...
...
@@ -31,8 +32,7 @@ class Type {
const
USER_GROUP
=
3
;
/**
* Default value of property $minVersion. Default value also needs to be specified in property annotation:
* options={"default" = "4.5"}
* Default value of property $minVersion. Default value also needs to be specified in property annotations.
*/
const
MIN_VERSION_DEFAULT
=
"4.5"
;
...
...
@@ -70,7 +70,11 @@ class Type {
* @var string The TYPO3 version in which the type was introduced
* Example: "4.5" "6.1" "6.2"), NULL is interpreted as most early version.
*
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=true)
* @Assert\Range(
* min = 4.5,
* minMessage = "Lowest supported version is {{ limit }}.",
* )
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=false)
*/
private
$minVersion
=
Type
::
MIN_VERSION_DEFAULT
;
...
...
@@ -110,6 +114,7 @@ class Type {
/**
* Properties of the Type
*
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="Property", mappedBy="parentType")
...
...
@@ -153,7 +158,6 @@ class Type {
return
$this
->
name
;
}
/**
* Get urlName
*
...
...
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