Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
indicateur
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
indicateur
Commits
8607c4dc
Commit
8607c4dc
authored
2 years ago
by
Jean-Philippe Metivier
Browse files
Options
Downloads
Patches
Plain Diff
Parametrage
parent
40774100
No related branches found
No related tags found
No related merge requests found
Pipeline
#17336
passed
2 years ago
Stage: publish
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/UnicaenIndicateur/View/Helper/IndicateurViewHelper.php
+8
-0
8 additions, 0 deletions
src/UnicaenIndicateur/View/Helper/IndicateurViewHelper.php
src/UnicaenIndicateur/View/Helper/partial/indicateur.phtml
+5
-2
5 additions, 2 deletions
src/UnicaenIndicateur/View/Helper/partial/indicateur.phtml
with
13 additions
and
2 deletions
src/UnicaenIndicateur/View/Helper/IndicateurViewHelper.php
+
8
−
0
View file @
8607c4dc
...
...
@@ -11,6 +11,14 @@ use UnicaenIndicateur\Service\Indicateur\IndicateurServiceAwareTrait;
class
IndicateurViewHelper
extends
AbstractHelper
{
use
IndicateurServiceAwareTrait
;
/**
* @param Indicateur $indicateur
* @param array $options
* @return \Laminas\View\Helper\Partial|string
*
* La clef $options['ViewHelper'] permet d'indiquer le ViewHelperpour réaliser l'affichage
* attention celui-ci doit implementer l'interface ItemViewHelperInterface
*/
public
function
__invoke
(
Indicateur
$indicateur
,
array
$options
=
[])
{
/** @var PhpRenderer $view */
...
...
This diff is collapsed.
Click to expand it.
src/UnicaenIndicateur/View/Helper/partial/indicateur.phtml
+
5
−
2
View file @
8607c4dc
...
...
@@ -9,6 +9,9 @@ use UnicaenIndicateur\Entity\Db\Indicateur;
* @var array $options
*/
$viewhelper
=
'defaultItem'
;
if
(
isset
(
$options
[
'ViewHelper'
]))
$viewhelper
=
$options
[
'ViewHelper'
]
?>
<div>
...
...
@@ -16,12 +19,12 @@ use UnicaenIndicateur\Entity\Db\Indicateur;
id=
"indicateur_
<?php
echo
$indicateur
->
getId
();
?>
"
class=
"datatable table table-condensed table-hover"
>
<?php
echo
$this
->
defaultItem
(
$indicateur
)
->
getHeader
(
$data
);
?>
<?php
echo
$this
->
{
$viewhelper
}
(
$indicateur
)
->
getHeader
(
$data
);
?>
<tbody>
<?php
$nbLine
=
count
(
$data
[
1
]);
?>
<?php
for
(
$position
=
0
;
$position
<
count
(
$data
[
1
])
;
$position
++
)
{
echo
$this
->
defaultItem
(
$indicateur
)
->
getItem
(
$data
,
$position
);
echo
$this
->
{
$viewhelper
}
(
$indicateur
)
->
getItem
(
$data
,
$position
);
}
?>
</tbody>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment