mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Added some tests for important entity methods.
This commit is contained in:
parent
0663a00df8
commit
89258bc102
18 changed files with 480 additions and 160 deletions
|
@ -87,19 +87,20 @@ class AttachmentType extends StructuralDBElement
|
|||
*/
|
||||
protected $filetype_filter = "";
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->attachments = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all attachements ("Attachement" objects) with this type.
|
||||
* Get all attachments ("Attachment" objects) with this type.
|
||||
*
|
||||
* @return Collection|Attachment[] all attachements with this type, as a one-dimensional array of Attachement-objects
|
||||
* @return Collection|Attachment[] all attachements with this type, as a one-dimensional array of Attachements
|
||||
* (sorted by their names)
|
||||
*/
|
||||
public function getAttachementsForType(): Collection
|
||||
public function getAttachmentsForType(): Collection
|
||||
{
|
||||
// the attribute $this->attachements is used from class "AttachementsContainingDBELement"
|
||||
if (null === $this->attachments) {
|
||||
$this->attachments = new ArrayCollection();
|
||||
}
|
||||
|
||||
return $this->attachments;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue