mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-18 17:31:35 +00:00
Added comments
This commit is contained in:
parent
abb1581c0f
commit
0fb98d8e68
2 changed files with 10 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
|||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* Form type for editing the custom KiCad footprints and symbols lists.
|
||||
*/
|
||||
final class KicadListEditorType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ use RuntimeException;
|
|||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
|
||||
|
||||
/**
|
||||
* Manages the KiCad footprints and symbols list files, including reading, writing and ensuring their existence.
|
||||
*/
|
||||
final class KicadListFileManager implements CacheWarmerInterface
|
||||
{
|
||||
private const FOOTPRINTS_PATH = '/public/kicad/footprints.txt';
|
||||
|
|
@ -143,6 +146,10 @@ final class KicadListFileManager implements CacheWarmerInterface
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the custom footprints and symbols files exist and generate them on cache warmup, so that the frontend
|
||||
* can always display them without error, even if the user has not yet visited the settings page.
|
||||
*/
|
||||
public function warmUp(string $cacheDir, ?string $buildDir = null): array
|
||||
{
|
||||
$this->createCustomFilesIfNotExist();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue