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:
Matthias Jentsch 2014-07-16 15:16:05 +02:00
parent 5c507d5d91
commit bfc54b7e32
3 changed files with 9 additions and 5 deletions

View File

@ -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();
}
/**

View File

@ -310,6 +310,11 @@ class UrlParams
}
}
public function asArray()
{
return $this->params;
}
public function __toString()
{
$parts = array();

View File

@ -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;
}