mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 03:08:51 +02:00
Added some basic part edit and create forms.
This commit is contained in:
parent
44c482caf2
commit
cc1badb853
15 changed files with 253 additions and 95 deletions
|
@ -25,6 +25,8 @@ namespace App\Entity;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* All subclasses of this class have an attribute "name".
|
||||
*
|
||||
|
@ -36,8 +38,10 @@ abstract class NamedDBElement extends DBElement
|
|||
/**
|
||||
* @var string The name of this element.
|
||||
* @ORM\Column(type="string")
|
||||
* @Assert\NotBlank()
|
||||
*
|
||||
*/
|
||||
protected $name;
|
||||
protected $name = "";
|
||||
|
||||
/**
|
||||
* @var \DateTime The date when this element was modified the last time.
|
||||
|
@ -64,8 +68,10 @@ abstract class NamedDBElement extends DBElement
|
|||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
/*
|
||||
//Strip HTML from Name, so no XSS injection is possible.
|
||||
return strip_tags($this->name);
|
||||
return strip_tags($this->name); */
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue