Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-04-27 13:03:31 +0300
committerGitHub <noreply@github.com>2020-04-27 13:03:31 +0300
commit8260e6ac807e008e83a1bf5a7888906092ceac9e (patch)
treecf00fcbf4c84bde6cbeefa0427f9527fe76a1e20 /plugins/Live
parentdad1e4cbc72684915eca3405d2ad9b0bb23dced4 (diff)
Improve generated docs on extending profile summary (#15864)
* Improve generated docs on extending profile summary * submodule update
Diffstat (limited to 'plugins/Live')
-rw-r--r--plugins/Live/ProfileSummary/ImportantVisits.php2
-rw-r--r--plugins/Live/ProfileSummary/ProfileSummaryAbstract.php20
-rw-r--r--plugins/Live/ProfileSummary/Summary.php6
3 files changed, 18 insertions, 10 deletions
diff --git a/plugins/Live/ProfileSummary/ImportantVisits.php b/plugins/Live/ProfileSummary/ImportantVisits.php
index 41eae570dc..f5f60bcca0 100644
--- a/plugins/Live/ProfileSummary/ImportantVisits.php
+++ b/plugins/Live/ProfileSummary/ImportantVisits.php
@@ -14,8 +14,6 @@ use Piwik\View;
/**
* Class ImportantVisits
- *
- * @api
*/
class ImportantVisits extends ProfileSummaryAbstract
{
diff --git a/plugins/Live/ProfileSummary/ProfileSummaryAbstract.php b/plugins/Live/ProfileSummary/ProfileSummaryAbstract.php
index 0190dc63d8..138ad2140e 100644
--- a/plugins/Live/ProfileSummary/ProfileSummaryAbstract.php
+++ b/plugins/Live/ProfileSummary/ProfileSummaryAbstract.php
@@ -18,7 +18,7 @@ namespace Piwik\Plugins\Live\ProfileSummary;
abstract class ProfileSummaryAbstract
{
/**
- * Visitor profile information
+ * Visitor profile information (will be automatically set)
*
* @var array
*/
@@ -49,19 +49,31 @@ abstract class ProfileSummaryAbstract
*
* @return string
*/
- abstract function getName();
+ abstract public function getName();
/**
* Renders and returns the summary
*
+ * **Example**
+ *
+ * public function render() {
+ * if (empty($this->profile['crmData'])) {
+ * return '';
+ * }
+ *
+ * $view = new View('@pluginName/summary.twig');
+ * $view->crmData = $this->profile['crmData];
+ * return $view->render();
+ * }
+ *
* @return string
*/
- abstract function render();
+ abstract public function render();
/**
* Returns order indicator used to sort all summaries before displaying them
*
* @return int
*/
- abstract function getOrder();
+ abstract public function getOrder();
} \ No newline at end of file
diff --git a/plugins/Live/ProfileSummary/Summary.php b/plugins/Live/ProfileSummary/Summary.php
index 0b7a423328..9f864f3bd4 100644
--- a/plugins/Live/ProfileSummary/Summary.php
+++ b/plugins/Live/ProfileSummary/Summary.php
@@ -15,11 +15,9 @@ use Piwik\View;
use Piwik\Plugins\Goals\API as APIGoals;
/**
- * Class ProfileSummaryAbstract
+ * Class Summary
*
- * This class can be implemented in a plugin to provide a new profile summary
- *
- * @api
+ * Displays some general details in the profile summary
*/
class Summary extends ProfileSummaryAbstract
{