diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-20 02:06:19 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-08-15 18:39:14 +0300 |
commit | b4119142c7b262a16e8a30d730b60eb7bc5dabae (patch) | |
tree | 110d9c14a1b89f886d5d53d593defdb971e925cc /lib/Detail.php | |
parent | aa54646c05877ac47ba35d3865e7953f82d11066 (diff) |
Generate form schema from sections/details
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/Detail.php')
-rw-r--r-- | lib/Detail.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Detail.php b/lib/Detail.php index 23b2555..0c30446 100644 --- a/lib/Detail.php +++ b/lib/Detail.php @@ -26,12 +26,17 @@ namespace OCA\IssueTemplate; class Detail implements IDetail { private $section; + private $identifier; private $title; private $information; private $type; - public function __construct($section, $title, $information, $type) { + public function __construct($section, $title, $information, $type, $identifier = '') { $this->section = $section; + $this->identifier = $identifier; + if ($identifier === '') { + $this->identifier = md5($title); + } $this->title = $title; $this->information = $information; $this->type = $type; @@ -52,4 +57,8 @@ class Detail implements IDetail { public function getSection() { return $this->section; } + + public function getIdentifier() { + return $this->identifier; + } }
\ No newline at end of file |