This commit is contained in:
2022-09-05 14:49:07 +02:00
parent 6dbee02d82
commit c442529799
144 changed files with 3683 additions and 3809 deletions

View File

@@ -525,6 +525,21 @@ class ExportController extends AbstractController
);
}
private function getExportGroup($target): string
{
$exportManager = $this->exportManager;
$groups = $exportManager->getExportsGrouped(true);
foreach ($groups as $group => $array) {
foreach ($array as $alias => $export) {
if ($export === $target) {
return $group;
}
}
}
}
/**
* get the next step. If $reverse === true, the previous step is returned.
*
@@ -572,19 +587,4 @@ class ExportController extends AbstractController
throw new LogicException("the step {$step} is not defined.");
}
}
private function getExportGroup($target): string
{
$exportManager = $this->exportManager;
$groups = $exportManager->getExportsGrouped(true);
foreach ($groups as $group => $array) {
foreach ($array as $alias => $export) {
if ($export === $target) {
return $group;
}
}
}
}
}

View File

@@ -1,10 +1,18 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Doctrine\DQL;
use Doctrine\ORM\Query\AST\Functions\DateDiffFunction;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\AST\PathExpression;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
@@ -12,7 +20,7 @@ use Doctrine\ORM\Query\SqlWalker;
/**
* Extract postgresql function
* https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
* https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT.
*
* Usage : EXTRACT(field FROM timestamp)
* TODO allow interval usage -> EXTRACT(field FROM interval)
@@ -50,5 +58,4 @@ class Extract extends FunctionNode
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
}
}

View File

@@ -1,5 +1,14 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Doctrine\DQL;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
@@ -8,7 +17,7 @@ use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
/**
* Usage : TO_CHAR(datetime, fmt)
* Usage : TO_CHAR(datetime, fmt).
*/
class ToChar extends FunctionNode
{
@@ -34,5 +43,4 @@ class ToChar extends FunctionNode
$this->fmt = $parser->StringExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
}
}

View File

@@ -1,5 +1,12 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\Migrations\Main;
@@ -8,10 +15,16 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add new entity GeographicalUnit
* Add new entity GeographicalUnit.
*/
final class Version20220829132409 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('DROP SEQUENCE chill_main_geographical_unit_id_seq CASCADE');
$this->addSql('DROP TABLE chill_main_geographical_unit');
}
public function getDescription(): string
{
return 'Add new entity GeographicalUnit';
@@ -22,10 +35,4 @@ final class Version20220829132409 extends AbstractMigration
$this->addSql('CREATE SEQUENCE chill_main_geographical_unit_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE chill_main_geographical_unit (id INT NOT NULL, geom TEXT DEFAULT NULL, layerName VARCHAR(255) DEFAULT NULL, unitName VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
}
public function down(Schema $schema): void
{
$this->addSql('DROP SEQUENCE chill_main_geographical_unit_id_seq CASCADE');
$this->addSql('DROP TABLE chill_main_geographical_unit');
}
}