Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
e18a6a22
Valider
e18a6a22
rédigé
11 years ago
par
diosmosis
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Refs #4200, finished documenting ViewDataTable\Config class.
parent
1a92513f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
core/ViewDataTable/Config.php
+58
-15
58 ajouts, 15 suppressions
core/ViewDataTable/Config.php
avec
58 ajouts
et
15 suppressions
core/ViewDataTable/Config.php
+
58
−
15
Voir le fichier @
e18a6a22
...
@@ -18,6 +18,7 @@ use Piwik\Plugins\API\API;
...
@@ -18,6 +18,7 @@ use Piwik\Plugins\API\API;
* Contains base display properties for ViewDataTables. Manipulating these properties
* Contains base display properties for ViewDataTables. Manipulating these properties
* in a ViewDataTable instance will change how its report will be displayed.
* in a ViewDataTable instance will change how its report will be displayed.
*
*
* <a name="client-side-properties-desc"></a>
* **Client Side Properties**
* **Client Side Properties**
*
*
* Client side properties are properties that should be passed on to the browser so
* Client side properties are properties that should be passed on to the browser so
...
@@ -154,10 +155,6 @@ class Config
...
@@ -154,10 +155,6 @@ class Config
/**
/**
* Array property mapping DataTable column names with their internationalized names.
* Array property mapping DataTable column names with their internationalized names.
*
*
* The value you specify for this property is merged with the default value so you
* don't have to specify translations that already exist in the default value.
* TODO: still accurate?
*
* The default value for this property is set elsewhere. It will contain translations
* The default value for this property is set elsewhere. It will contain translations
* of common metrics.
* of common metrics.
*/
*/
...
@@ -460,7 +457,10 @@ class Config
...
@@ -460,7 +457,10 @@ class Config
}
}
/**
/**
* TODO
* Marks display properties as client side properties. [Read this](#client-side-properties-desc)
* to learn more.
*
* @param array $propertyNames List of property names, eg, `array('show_limit_control', 'show_goals')`.
*/
*/
public
function
addPropertiesThatShouldBeAvailableClientSide
(
array
$propertyNames
)
public
function
addPropertiesThatShouldBeAvailableClientSide
(
array
$propertyNames
)
{
{
...
@@ -470,7 +470,10 @@ class Config
...
@@ -470,7 +470,10 @@ class Config
}
}
/**
/**
* TODO
* Marks display properties as overridable. [Read this](#overridable-properties-desc) to
* learn more.
*
* @param array $propertyNames List of property names, eg, `array('show_limit_control', 'show_goals')`.
*/
*/
public
function
addPropertiesThatCanBeOverwrittenByQueryParams
(
array
$propertyNames
)
public
function
addPropertiesThatCanBeOverwrittenByQueryParams
(
array
$propertyNames
)
{
{
...
@@ -480,7 +483,10 @@ class Config
...
@@ -480,7 +483,10 @@ class Config
}
}
/**
/**
* TODO
* Returns array of all property values in this config object. Property values are mapped
* by name.
*
* @return array eg, `array('show_limit_control' => 0, 'show_goals' => 1, ...)`
*/
*/
public
function
getProperties
()
public
function
getProperties
()
{
{
...
@@ -488,7 +494,7 @@ class Config
...
@@ -488,7 +494,7 @@ class Config
}
}
/**
/**
*
TODO
*
@ignore
*/
*/
public
function
setDefaultColumnsToDisplay
(
$columns
,
$hasNbVisits
,
$hasNbUniqVisitors
)
public
function
setDefaultColumnsToDisplay
(
$columns
,
$hasNbVisits
,
$hasNbUniqVisitors
)
{
{
...
@@ -509,7 +515,7 @@ class Config
...
@@ -509,7 +515,7 @@ class Config
}
}
/**
/**
*
TODO
*
@ignore
*/
*/
public
function
getFiltersToRun
()
public
function
getFiltersToRun
()
{
{
...
@@ -536,7 +542,14 @@ class Config
...
@@ -536,7 +542,14 @@ class Config
}
}
/**
/**
* TODO
* Adds a related report to the [related_reports](#related_reports) property. If the report
* references the one that is currently being displayed, it will not be added to the related
* report list.
*
* @param string $relatedReport The plugin and method of the report, eg, `'UserSettings.getBrowser'`.
* @param string $title The report's display name, eg, `'Browsers'`.
* @param array $queryParams Any extra query parameters to set in releated report's URL, eg,
* `array('idGoal' => 'ecommerceOrder')`.
*/
*/
public
function
addRelatedReport
(
$relatedReport
,
$title
,
$queryParams
=
array
())
public
function
addRelatedReport
(
$relatedReport
,
$title
,
$queryParams
=
array
())
{
{
...
@@ -553,7 +566,21 @@ class Config
...
@@ -553,7 +566,21 @@ class Config
}
}
/**
/**
* TODO
* Adds several related reports to the [related_reports](#related_reports) property. If
* any of the reports references the report that is currently being displayed, it will not
* be added to the list. All other reports will still be added though.
*
* If you need to make sure the related report URL has some extra query parameters,
* use [addRelatedReport](#addRelatedReport).
*
* @param array $relatedReports Array mapping report IDs with their internationalized display
* titles, eg,
* ```
* array(
* 'UserSettings.getBrowser' => 'Browsers',
* 'UserSettings.getConfiguration' => 'Configurations'
* )
* ```
*/
*/
public
function
addRelatedReports
(
$relatedReports
)
public
function
addRelatedReports
(
$relatedReports
)
{
{
...
@@ -563,15 +590,31 @@ class Config
...
@@ -563,15 +590,31 @@ class Config
}
}
/**
/**
* TODO
* Associates internationalized text with a metric. Overwrites existing mappings.
*
* See [translations](#translations).
*
* @param string $columnName The name of a column in the report data, eg, `'nb_visits'` or
* `'goal_1_nb_conversions'`.
* @param string $translation The internationalized text, eg, `'Visits'` or `"Conversions for 'My Goal'"`.
*/
*/
public
function
addTranslation
(
$
key
,
$translation
)
public
function
addTranslation
(
$
columnName
,
$translation
)
{
{
$this
->
translations
[
$
key
]
=
$translation
;
$this
->
translations
[
$
columnName
]
=
$translation
;
}
}
/**
/**
* TODO
* Associates multiple translations with metrics.
*
* See [translations](#translations) and [addTranslation](#addTranslation).
*
* @param array $translations An array of column name => text mappings, eg,
* ```
* array(
* 'nb_visits' => 'Visits',
* 'goal_1_nb_conversions' => "Conversions for 'My Goal'"
* )
* ```
*/
*/
public
function
addTranslations
(
$translations
)
public
function
addTranslations
(
$translations
)
{
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter