mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class CurrencyList extends BaseType
|
|
{
|
|
public static $type = TYPE_CURRENCY;
|
|
|
|
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_currencies c';
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
foreach ($this->iterate() as $__)
|
|
{
|
|
$data[$this->id] = array(
|
|
'id' => $this->id,
|
|
'category' => $this->curTpl['category'],
|
|
'name' => $this->getField('name', true),
|
|
'icon' => $this->curTpl['iconString']
|
|
);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addGlobalsToJscript(&$template, $addMask = 0)
|
|
{
|
|
foreach ($this->iterate() as $__)
|
|
{
|
|
$template->extendGlobalData(self::$type, [$this->id => array(
|
|
'name' => $this->getField('name', true),
|
|
'icon' => $this->curTpl['iconString']
|
|
)]);
|
|
}
|
|
}
|
|
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|