Commit fb31d8f6 by Alexander Makarov

added Panel phpdoc

parent dd47668c
...@@ -11,6 +11,9 @@ use Yii; ...@@ -11,6 +11,9 @@ use Yii;
use yii\base\Component; use yii\base\Component;
/** /**
* Panel is a base class for debugger panel. It defines how data should be collected,
* what should be dispalyed at debug toolbar and on debugger details view.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
...@@ -24,21 +27,36 @@ class Panel extends Component ...@@ -24,21 +27,36 @@ class Panel extends Component
public $module; public $module;
public $data; public $data;
/**
* @return string name of the panel
*/
public function getName() public function getName()
{ {
return ''; return '';
} }
/**
* @return string content that is displayed at debug toolbar
*/
public function getSummary() public function getSummary()
{ {
return ''; return '';
} }
/**
* @return string content that is displayed in debugger detail view
*/
public function getDetail() public function getDetail()
{ {
return ''; return '';
} }
/**
* Saves data to be later used in debugger detail view.
* This method is called on every page where debugger is enabled.
*
* @return mixed data to be saved
*/
public function save() public function save()
{ {
return null; return null;
...@@ -49,6 +67,9 @@ class Panel extends Component ...@@ -49,6 +67,9 @@ class Panel extends Component
$this->data = $data; $this->data = $data;
} }
/**
* @return string URL pointing to panel detail view
*/
public function getUrl() public function getUrl()
{ {
return Yii::$app->getUrlManager()->createUrl($this->module->id . '/default/view', array( return Yii::$app->getUrlManager()->createUrl($this->module->id . '/default/view', array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment