diff --git a/composer.lock b/composer.lock index e3f2b8d..401755b 100644 --- a/composer.lock +++ b/composer.lock @@ -2355,16 +2355,16 @@ }, { "name": "symfony/maker-bundle", - "version": "v1.0.2", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/symfony/maker-bundle.git", - "reference": "bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef" + "reference": "ba427289009de6f0fd51fb51186eeaa70ab3a33d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef", - "reference": "bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/ba427289009de6f0fd51fb51186eeaa70ab3a33d", + "reference": "ba427289009de6f0fd51fb51186eeaa70ab3a33d", "shasum": "" }, "require": { @@ -2377,6 +2377,7 @@ "symfony/http-kernel": "^3.4|^4.0" }, "require-dev": { + "allocine/twigcs": "^3.0", "friendsofphp/php-cs-fixer": "^2.8", "symfony/phpunit-bridge": "^3.4|^4.0", "symfony/process": "^3.4|^4.0" @@ -2402,13 +2403,15 @@ "homepage": "https://symfony.com/contributors" } ], + "description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.", + "homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html", "keywords": [ "code generator", "generator", "scaffold", "scaffolding" ], - "time": "2017-12-04T17:50:28+00:00" + "time": "2018-02-21T19:43:12+00:00" }, { "name": "symfony/monolog-bridge", @@ -3536,16 +3539,16 @@ }, { "name": "symfony/flex", - "version": "v1.0.68", + "version": "v1.0.70", "source": { "type": "git", "url": "https://github.com/symfony/flex.git", - "reference": "0241b2acbb58df29e633b03fb56eb349a207613f" + "reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/0241b2acbb58df29e633b03fb56eb349a207613f", - "reference": "0241b2acbb58df29e633b03fb56eb349a207613f", + "url": "https://api.github.com/repos/symfony/flex/zipball/1f00c05d35523dc0ac52e4a457989a069be5a7a4", + "reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4", "shasum": "" }, "require": { @@ -3578,7 +3581,7 @@ "email": "fabien.potencier@gmail.com" } ], - "time": "2018-01-31T19:34:57+00:00" + "time": "2018-02-22T07:00:47+00:00" } ], "aliases": [], diff --git a/src/Entity/Film.php b/src/Entity/Film.php index df38fbb..d98efa2 100644 --- a/src/Entity/Film.php +++ b/src/Entity/Film.php @@ -75,28 +75,35 @@ class Film { * * @ORM\Column(name="film_base", type="string", nullable=false, options={"default"="Cellulose Triacetate"}) */ - private $filmBase; + private $filmBase = 'Cellulose Triacetate'; /** * @var int * * @ORM\Column(name="unused_rolls", type="integer", nullable=false, options={"default"=0}) */ - private $unusedRolls; + private $unusedRolls = 0; + + /** + * @var int + * + * @ORM\Column(name="rolls_in_camera", type="integer", nullable=false, options={"default"=0}) + */ + private $rollsInCamera = 0; /** * @var int * * @ORM\Column(name="developed_rolls", type="integer", nullable=false, options={"default"=0}) */ - private $developedRolls; + private $developedRolls = 0; /** * @var string * * @ORM\Column(name="chemistry", type="string", nullable=false, options={"default"="C-41"}) */ - private $chemistry; + private $chemistry = 'C-41'; /** * @var string @@ -275,6 +282,24 @@ class Film { return $this; } + /** + * @return int + */ + public function getRollsInCamera(): ?int + { + return $this->rollsInCamera; + } + + /** + * @param int $rollsInCamera + * @return self + */ + public function setRollsInCamera(int $rollsInCamera): self + { + $this->rollsInCamera = $rollsInCamera; + return $this; + } + /** * @return int */ diff --git a/src/Form/FilmType.php b/src/Form/FilmType.php index 48472e3..c570ef9 100644 --- a/src/Form/FilmType.php +++ b/src/Form/FilmType.php @@ -23,6 +23,7 @@ class FilmType extends AbstractType ->add('filmFormat') ->add('filmBase') ->add('unusedRolls') + ->add('rollsInCamera') ->add('developedRolls') ->add('chemistry') ->add('notes'); diff --git a/templates/base.html.twig b/templates/base.html.twig index 206e778..7e51a65 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -5,7 +5,7 @@ - {% block title %}Welcome!{% endblock %} + {% block title %}Camera 📷 CRUD{% endblock %} {% block stylesheets %}{% endblock %} diff --git a/templates/camera/edit.html.twig b/templates/camera/edit.html.twig index 7907773..0217a80 100644 --- a/templates/camera/edit.html.twig +++ b/templates/camera/edit.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Cameras - Edit +{% endblock %} + {% block form %}

Edit Camera

diff --git a/templates/camera/index.html.twig b/templates/camera/index.html.twig index cb290e0..1890487 100644 --- a/templates/camera/index.html.twig +++ b/templates/camera/index.html.twig @@ -1,5 +1,9 @@ {% extends 'base.html.twig' %} +{% block title %} + Camera 📷 CRUD - Cameras +{% endblock %} + {% block body %}

Cameras

diff --git a/templates/camera/new.html.twig b/templates/camera/new.html.twig index 66ad6f6..50b9a98 100644 --- a/templates/camera/new.html.twig +++ b/templates/camera/new.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Cameras - Add +{% endblock %} + {% block form %}

Add a Camera

diff --git a/templates/camera/show.html.twig b/templates/camera/show.html.twig index 0922473..13f993e 100644 --- a/templates/camera/show.html.twig +++ b/templates/camera/show.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Camera - Show +{% endblock %} + {% block form %}

Camera

diff --git a/templates/cameratype/edit.html.twig b/templates/cameratype/edit.html.twig index 1f43180..27f48c9 100644 --- a/templates/cameratype/edit.html.twig +++ b/templates/cameratype/edit.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Camera Type - Edit +{% endblock %} + {% block form %}

Edit Camera Type

diff --git a/templates/cameratype/index.html.twig b/templates/cameratype/index.html.twig index 467d20d..8bb6706 100644 --- a/templates/cameratype/index.html.twig +++ b/templates/cameratype/index.html.twig @@ -1,5 +1,9 @@ {% extends 'base.html.twig' %} +{% block title %} + Camera 📷 CRUD - Camera Types +{% endblock %} + {% block body %}

Camera Types

diff --git a/templates/cameratype/new.html.twig b/templates/cameratype/new.html.twig index c7b8dc8..81109c5 100644 --- a/templates/cameratype/new.html.twig +++ b/templates/cameratype/new.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Camera Type - Add +{% endblock %} + {% block form %}

Add a Camera Type

diff --git a/templates/cameratype/show.html.twig b/templates/cameratype/show.html.twig index 4d9c5e1..e834565 100644 --- a/templates/cameratype/show.html.twig +++ b/templates/cameratype/show.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Camera Type - Show +{% endblock %} + {% block form %}

Camera Type

diff --git a/templates/default/index.html.twig b/templates/default/index.html.twig index 3f93ac7..da4d7fa 100644 --- a/templates/default/index.html.twig +++ b/templates/default/index.html.twig @@ -1,5 +1,9 @@ {% extends 'base.html.twig' %} +{% block title %} +Camera 📷 CRUD +{% endblock %} + {% block body %}
{% endblock %} diff --git a/templates/film/edit.html.twig b/templates/film/edit.html.twig index 2f47a77..dc71aa8 100644 --- a/templates/film/edit.html.twig +++ b/templates/film/edit.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Film - Edit +{% endblock %} + {% block form %}

Edit Film

diff --git a/templates/film/index.html.twig b/templates/film/index.html.twig index 1cebc5a..a49dc15 100644 --- a/templates/film/index.html.twig +++ b/templates/film/index.html.twig @@ -1,5 +1,9 @@ {% extends 'base.html.twig' %} +{% block title %} + Camera 📷 CRUD - Film +{% endblock %} + {% block body %}

Film

@@ -24,6 +28,7 @@ Film Format Film Base Unused Rolls + Rolls in a Camera Developed Rolls Chemistry Notes @@ -48,6 +53,7 @@ {{ film.filmFormat }} {{ film.filmBase }} {{ film.unusedRolls }} + {{ film.rollsInCamera }} {{ film.developedRolls }} {{ film.chemistry }} {{ film.notes }} diff --git a/templates/film/new.html.twig b/templates/film/new.html.twig index 80b8f7c..0164852 100644 --- a/templates/film/new.html.twig +++ b/templates/film/new.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Film - Add +{% endblock %} + {% block form %}

Add a Film

diff --git a/templates/film/show.html.twig b/templates/film/show.html.twig index 04696a4..828d684 100644 --- a/templates/film/show.html.twig +++ b/templates/film/show.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Film - Show +{% endblock %} + {% block form %}

Film

@@ -61,6 +65,10 @@ # of Unused Rolls {{ film.unusedRolls }} + + # of Rolls in a Camera + {{ film.rollsInCamera }} + # of Developed Rolls {{ film.developedRolls }} diff --git a/templates/flash/edit.html.twig b/templates/flash/edit.html.twig index 305d66b..a576507 100644 --- a/templates/flash/edit.html.twig +++ b/templates/flash/edit.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Flash - Edit +{% endblock %} + {% block form %}

Flash edit

diff --git a/templates/flash/index.html.twig b/templates/flash/index.html.twig index fd8a58b..987f0ae 100644 --- a/templates/flash/index.html.twig +++ b/templates/flash/index.html.twig @@ -1,5 +1,9 @@ {% extends 'base.html.twig' %} +{% block title %} + Camera 📷 CRUD - Flashes +{% endblock %} + {% block body %}

Flashes list

diff --git a/templates/flash/new.html.twig b/templates/flash/new.html.twig index d91cc6c..deadc6f 100644 --- a/templates/flash/new.html.twig +++ b/templates/flash/new.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Flash - Add +{% endblock %} + {% block form %}

Add a Flash

diff --git a/templates/flash/show.html.twig b/templates/flash/show.html.twig index dbe70a2..850f3a1 100644 --- a/templates/flash/show.html.twig +++ b/templates/flash/show.html.twig @@ -1,5 +1,9 @@ {% extends 'form.html.twig' %} +{% block title %} + Camera 📷 CRUD - Flash - Show +{% endblock %} + {% block form %}

Flash

diff --git a/templates/header.html.twig b/templates/header.html.twig index 19ab0f3..1d1c6e2 100644 --- a/templates/header.html.twig +++ b/templates/header.html.twig @@ -1,4 +1,4 @@ -

Camera Collection Admin

+

Camera Collection CRUD

+