mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-24 02:44:51 +03:00
getItems method overwrites in the ClientsModel
This commit is contained in:
parent
d87a9b1471
commit
4e594ac303
@ -84,6 +84,44 @@ class ClientsModel extends ListModel
|
|||||||
return parent::getStoreId($id);
|
return parent::getStoreId($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @since version
|
||||||
|
*/
|
||||||
|
public function getItems()
|
||||||
|
{
|
||||||
|
$result = parent::getItems();
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get a storage key.
|
||||||
|
$store = $this->getStoreId();
|
||||||
|
|
||||||
|
/** @var \stdClass $row */
|
||||||
|
foreach ($result as &$row)
|
||||||
|
{
|
||||||
|
// Convert `public` field to bool
|
||||||
|
$row->public = !empty($row->public);
|
||||||
|
|
||||||
|
if (!empty($row->scopes))
|
||||||
|
{
|
||||||
|
$row->scopes = json_decode($row->scopes, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($row->grants))
|
||||||
|
{
|
||||||
|
$row->grants = json_decode($row->grants, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->cache[$store] = $result;
|
||||||
|
|
||||||
|
return $this->cache[$store];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to get a DatabaseQuery object for retrieving the data set from a database.
|
* Method to get a DatabaseQuery object for retrieving the data set from a database.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user