diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-04-27 13:03:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 13:03:31 +0300 |
commit | 8260e6ac807e008e83a1bf5a7888906092ceac9e (patch) | |
tree | cf00fcbf4c84bde6cbeefa0427f9527fe76a1e20 /plugins | |
parent | dad1e4cbc72684915eca3405d2ad9b0bb23dced4 (diff) |
Improve generated docs on extending profile summary (#15864)
* Improve generated docs on extending profile summary
* submodule update
Diffstat (limited to 'plugins')
m--------- | plugins/Bandwidth | 0 | ||||
m--------- | plugins/CustomDimensions | 0 | ||||
-rw-r--r-- | plugins/CustomVariables/ProfileSummary/VisitScopeSummary.php | 2 | ||||
-rw-r--r-- | plugins/DevicesDetection/ProfileSummary/DevicesSummary.php | 2 | ||||
-rw-r--r-- | plugins/Ecommerce/ProfileSummary/EcommerceSummary.php | 2 | ||||
-rw-r--r-- | plugins/Live/ProfileSummary/ImportantVisits.php | 2 | ||||
-rw-r--r-- | plugins/Live/ProfileSummary/ProfileSummaryAbstract.php | 20 | ||||
-rw-r--r-- | plugins/Live/ProfileSummary/Summary.php | 6 | ||||
-rw-r--r-- | plugins/UserCountry/ProfileSummary/LocationSummary.php | 2 |
9 files changed, 18 insertions, 18 deletions
diff --git a/plugins/Bandwidth b/plugins/Bandwidth -Subproject 4f9303738db1e96b83add2c1b839b9658a9fe0f +Subproject 2e4d04472b2a0bdbf77f110a5da7aec5a2fef2e diff --git a/plugins/CustomDimensions b/plugins/CustomDimensions -Subproject 449915b81fdfae3294d75d7b668369858fb82f8 +Subproject ab748e7909e5553f0dfc6f4d583dbeb49c95582 diff --git a/plugins/CustomVariables/ProfileSummary/VisitScopeSummary.php b/plugins/CustomVariables/ProfileSummary/VisitScopeSummary.php index 2c45492ca2..4a3f47b31d 100644 --- a/plugins/CustomVariables/ProfileSummary/VisitScopeSummary.php +++ b/plugins/CustomVariables/ProfileSummary/VisitScopeSummary.php @@ -17,8 +17,6 @@ use Piwik\View; /** * Class VisitScopeSummary - * - * @api */ class VisitScopeSummary extends ProfileSummaryAbstract { diff --git a/plugins/DevicesDetection/ProfileSummary/DevicesSummary.php b/plugins/DevicesDetection/ProfileSummary/DevicesSummary.php index 0d6338fe81..ea26bf9800 100644 --- a/plugins/DevicesDetection/ProfileSummary/DevicesSummary.php +++ b/plugins/DevicesDetection/ProfileSummary/DevicesSummary.php @@ -15,8 +15,6 @@ use Piwik\View; /** * Class DevicesSummary - * - * @api */ class DevicesSummary extends ProfileSummaryAbstract { diff --git a/plugins/Ecommerce/ProfileSummary/EcommerceSummary.php b/plugins/Ecommerce/ProfileSummary/EcommerceSummary.php index f9a65fc6b5..98ba96dbae 100644 --- a/plugins/Ecommerce/ProfileSummary/EcommerceSummary.php +++ b/plugins/Ecommerce/ProfileSummary/EcommerceSummary.php @@ -16,8 +16,6 @@ use Piwik\View; /** * Class EcommerceSummary - * - * @api */ class EcommerceSummary extends ProfileSummaryAbstract { 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 { diff --git a/plugins/UserCountry/ProfileSummary/LocationSummary.php b/plugins/UserCountry/ProfileSummary/LocationSummary.php index 36c5d8333a..21174f4a4f 100644 --- a/plugins/UserCountry/ProfileSummary/LocationSummary.php +++ b/plugins/UserCountry/ProfileSummary/LocationSummary.php @@ -18,8 +18,6 @@ use Piwik\View; /** * Class LocationSummary - * - * @api */ class LocationSummary extends ProfileSummaryAbstract { |