mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Moved getParts() and getPartsCount() to a repository (instead of a class method).
This commit is contained in:
parent
350f1bb979
commit
14adb77a97
24 changed files with 421 additions and 71 deletions
|
@ -30,28 +30,9 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
/**
|
||||
* Class PartsContainingDBElement.
|
||||
*
|
||||
* @ORM\MappedSuperclass()
|
||||
* @ORM\MappedSuperclass(repositoryClass="App\Repository\AbstractPartsContainingRepository")
|
||||
*/
|
||||
abstract class AbstractPartsContainingDBElement extends AbstractStructuralDBElement
|
||||
{
|
||||
/**
|
||||
* @var Part[]|Collection
|
||||
*/
|
||||
protected $parts;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->parts = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parts associated with this element.
|
||||
*
|
||||
* @return Collection|Part[]
|
||||
*/
|
||||
public function getParts(): Collection
|
||||
{
|
||||
return $this->parts;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue