mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 13:49:33 +00:00
Projekt BOM-Konfiguration um Assemblies bereinigen.
Assembly BOM-Konfiguration um Projektauswahl erweitern (APS-3, APS-4)
This commit is contained in:
parent
df85017efb
commit
adbe310d7f
53 changed files with 739 additions and 1506 deletions
|
|
@ -10,14 +10,14 @@ class AssemblyTwigExtension extends AbstractExtension
|
|||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
new TwigFunction('has_assembly', [$this, 'hasAssembly']),
|
||||
new TwigFunction('has_project', [$this, 'hasProject']),
|
||||
];
|
||||
}
|
||||
|
||||
public function hasAssembly(array $bomEntries): bool
|
||||
public function hasProject(array $bomEntries): bool
|
||||
{
|
||||
foreach ($bomEntries as $entry) {
|
||||
if ($entry->getAssembly() !== null) {
|
||||
if ($entry->getProject() !== null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue