Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-mlc
kohinos
Commits
ea37da6e
Commit
ea37da6e
authored
Jun 12, 2019
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modification de FluxRepository.php pour prendre en compte le préfixe de la table 'flux'
parent
e838d298
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
FluxRepository.php
src/Repository/FluxRepository.php
+8
-12
No files found.
src/Repository/FluxRepository.php
View file @
ea37da6e
...
...
@@ -21,6 +21,9 @@ class FluxRepository extends ServiceEntityRepository
public
function
__construct
(
RegistryInterface
$registry
)
{
parent
::
__construct
(
$registry
,
Flux
::
class
);
$em
=
$this
->
getEntityManager
();
$this
->
connection
=
$em
->
getConnection
();
$this
->
tableName
=
$em
->
getMetadataFactory
()
->
getMetadataFor
(
Flux
::
class
)
->
getTableName
();
}
/**
...
...
@@ -29,9 +32,7 @@ class FluxRepository extends ServiceEntityRepository
*/
public
function
getQueryByPrestataire
(
Prestataire
$presta
)
{
$em
=
$this
->
getEntityManager
();
$connection
=
$em
->
getConnection
();
$statement
=
$connection
->
prepare
(
"SELECT f.id FROM flux f WHERE f.prestataire_id = :id OR f.prestataire_dest_id = :id"
);
$statement
=
$this
->
connection
->
prepare
(
"SELECT f.id FROM
{
$this
->
tableName
}
f WHERE f.prestataire_id = :id OR f.prestataire_dest_id = :id"
);
$statement
->
bindValue
(
'id'
,
$presta
->
getId
());
$statement
->
execute
();
$results
=
$statement
->
fetchAll
();
...
...
@@ -50,9 +51,7 @@ class FluxRepository extends ServiceEntityRepository
*/
public
function
getQueryByAdherent
(
Adherent
$adherent
)
{
$em
=
$this
->
getEntityManager
();
$connection
=
$em
->
getConnection
();
$statement
=
$connection
->
prepare
(
"SELECT f.id FROM flux f WHERE f.adherent_id = :id OR f.adherent_dest_id = :id"
);
$statement
=
$this
->
connection
->
prepare
(
"SELECT f.id FROM
{
$this
->
tableName
}
f WHERE f.adherent_id = :id OR f.adherent_dest_id = :id"
);
$statement
->
bindValue
(
'id'
,
$adherent
->
getId
());
$statement
->
execute
();
$results
=
$statement
->
fetchAll
();
...
...
@@ -71,9 +70,8 @@ class FluxRepository extends ServiceEntityRepository
*/
public
function
getQueryByComptoir
(
Comptoir
$comptoir
)
{
$em
=
$this
->
getEntityManager
();
$connection
=
$em
->
getConnection
();
$statement
=
$connection
->
prepare
(
"SELECT f.id FROM flux f WHERE f.comptoir_id = :id"
);
$statement
=
$this
->
connection
->
prepare
(
"SELECT f.id FROM
{
$this
->
tableName
}
f WHERE f.comptoir_id = :id"
);
$statement
->
bindValue
(
'id'
,
$comptoir
->
getId
());
$statement
->
execute
();
$results
=
$statement
->
fetchAll
();
...
...
@@ -92,9 +90,7 @@ class FluxRepository extends ServiceEntityRepository
*/
public
function
getQueryByGroupe
(
Groupe
$groupe
)
{
$em
=
$this
->
getEntityManager
();
$connection
=
$em
->
getConnection
();
$statement
=
$connection
->
prepare
(
"SELECT f.id FROM flux f WHERE f.groupe_id = :id"
);
$statement
=
$this
->
connection
->
prepare
(
"SELECT f.id FROM
{
$this
->
tableName
}
f WHERE f.groupe_id = :id"
);
$statement
->
bindValue
(
'id'
,
$groupe
->
getId
());
$statement
->
execute
();
$results
=
$statement
->
fetchAll
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment