mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 05:24:28 +02:00
Return $this in Entitys setters, so that they can be chained.
This commit is contained in:
parent
7dbdb959b8
commit
ee29ad3e5a
9 changed files with 99 additions and 44 deletions
|
@ -176,17 +176,19 @@ class Footprint extends PartsContainingDBElement
|
|||
*
|
||||
* @throws Exception if there was an error
|
||||
*/
|
||||
public function setFilename(string $new_filename)
|
||||
public function setFilename(string $new_filename) : self
|
||||
{
|
||||
$this->filename = $new_filename;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the 3d model filename of this footprint
|
||||
* @throws Exception if there was an error
|
||||
*/
|
||||
public function set3dFilename(string $new_filename)
|
||||
public function set3dFilename(string $new_filename) : self
|
||||
{
|
||||
$this->filename = $new_filename;
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue