bug fix in base html template

This commit is contained in:
babak alizadeh 2023-12-10 11:06:02 +03:30
parent 1a6feea31a
commit d1e0f1afd5
7 changed files with 78 additions and 2 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
hesabixArchive/

View file

@ -0,0 +1 @@
<?php

View file

@ -0,0 +1 @@
<?php

View file

@ -0,0 +1,44 @@
<?php
namespace App\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
#[AsCommand(
name: 'hesabix',
description: 'Add a short description for your command',
)]
class HesabixCommand extends Command
{
protected function configure(): void
{
$this
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
;
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$arg1 = $input->getArgument('arg1');
if ($arg1) {
$io->note(sprintf('You passed an argument: %s', $arg1));
}
if ($input->getOption('option1')) {
// ...
}
$io->success('You have a new command! Now make it your own! Pass --help to see your options.');
return Command::SUCCESS;
}
}

View file

@ -356,4 +356,31 @@ class AdminController extends AbstractController
} }
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
/**
* @throws Exception
*/
#[Route('/test', name: 'app_admin_database_backup_create')]
public function app_admin_database_backup_create(KernelInterface $kernel):JsonResponse
{
$application = new Application($kernel);
$application->setAutoExit(false);
$input = new ArrayInput([
'command' => 'doctrine:schema:create',
// (optional) define the value of command arguments
'--dump-sql' => true,
'../../hesabixBackup/databaseFiles/file.sql'=>true,
]);
// You can use NullOutput() if you don't need the output
$output = new BufferedOutput();
$application->run($input, $output);
// return the output, don't use if you used NullOutput()
$content = $output->fetch();
return $this->json([
'message' => $content,
]);
}
} }

View file

@ -238,7 +238,7 @@
<i class="fa fa-fw fa-hand-paper text-primary-lighter me-1"></i> درباره حسابیکس </a> <i class="fa fa-fw fa-hand-paper text-primary-lighter me-1"></i> درباره حسابیکس </a>
</li> </li>
<li> <li>
<a class="fw-semibold" href="/front/terms""> <a class="fw-semibold" href="/front/terms">
<i class="fa fa-fw fa-wand-magic text-primary-lighter me-1"></i> قوانین ارائه خدمات </a> <i class="fa fa-fw fa-wand-magic text-primary-lighter me-1"></i> قوانین ارائه خدمات </a>
</li> </li>
<li> <li>

View file

@ -1,5 +1,6 @@
{% extends "base.html.twig" %} {% extends "base.html.twig" %}
{% block title %}راهنما{% endblock %} {% block title %}راهنمای بخش {% if items | length != 0 %}{{ items.0.cat }}{% endif %}{% endblock %}
{% block description %}{{ block('title') }}{% endblock %}
{% block body %} {% block body %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">