bug fix in base html template
This commit is contained in:
parent
1a6feea31a
commit
d1e0f1afd5
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
hesabixArchive/
|
1
hesabixBackup/databasefiles/index.php
Normal file
1
hesabixBackup/databasefiles/index.php
Normal file
|
@ -0,0 +1 @@
|
|||
<?php
|
1
hesabixBackup/versions/index.php
Normal file
1
hesabixBackup/versions/index.php
Normal file
|
@ -0,0 +1 @@
|
|||
<?php
|
44
hesabixCore/src/Command/HesabixCommand.php
Normal file
44
hesabixCore/src/Command/HesabixCommand.php
Normal 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;
|
||||
}
|
||||
}
|
|
@ -356,4 +356,31 @@ class AdminController extends AbstractController
|
|||
}
|
||||
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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
<i class="fa fa-fw fa-hand-paper text-primary-lighter me-1"></i> درباره حسابیکس </a>
|
||||
</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>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% 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 %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue