Browse Source

added Panel phpdoc

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
fb31d8f6d8
  1. 21
      framework/yii/debug/Panel.php

21
framework/yii/debug/Panel.php

@ -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
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
$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(

Loading…
Cancel
Save