Fix array conversion of the Dashboard and its Components
Do not omit the parameters when converting the dashboard components to an array. Add an array conversion to the UrlParams class. refs #6691
This commit is contained in:
parent
5c507d5d91
commit
bfc54b7e32
|
@ -22,7 +22,7 @@ class Url
|
|||
/**
|
||||
* An array of all parameters stored in this Url
|
||||
*
|
||||
* @var array
|
||||
* @var UrlParams
|
||||
*/
|
||||
protected $params;
|
||||
|
||||
|
@ -335,7 +335,7 @@ class Url
|
|||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->params;
|
||||
return $this->params->asArray();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -310,6 +310,11 @@ class UrlParams
|
|||
}
|
||||
}
|
||||
|
||||
public function asArray()
|
||||
{
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
$parts = array();
|
||||
|
|
|
@ -126,10 +126,9 @@ EOD;
|
|||
public function toArray()
|
||||
{
|
||||
$array = array('url' => $this->url->getPath());
|
||||
foreach ($this->url->getParams() as $key => $value) {
|
||||
$array[$key] = $value;
|
||||
foreach ($this->url->getParams() as $param) {
|
||||
$array[$param[0]] = $param[1];
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue