mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Support "if" attribute in navigation elements of XML query
This commit is contained in:
parent
fd0491cb0d
commit
658a28dfd8
3 changed files with 25 additions and 5 deletions
|
|
@ -198,6 +198,7 @@ class DBQueryParser extends BaseParser
|
|||
$orderby->default = ($attribs['default'] ?? null) ?: null;
|
||||
$orderby->order_var = ($attribs['order'] ?? null) ?: null;
|
||||
$orderby->order_default = strtoupper($attribs['orderdefault'] ?? '') === 'DESC' ? 'DESC' : 'ASC';
|
||||
$orderby->ifvar = trim($attribs['if'] ?? '') ?: null;
|
||||
$query->navigation->orderby[] = $orderby;
|
||||
}
|
||||
foreach (['list_count', 'page_count', 'page', 'offset'] as $key)
|
||||
|
|
@ -207,6 +208,7 @@ class DBQueryParser extends BaseParser
|
|||
$query->navigation->{$key} = new DBQuery\VariableBase;
|
||||
$query->navigation->{$key}->var = trim($tag['var'] ?? '') ?: null;
|
||||
$query->navigation->{$key}->default = trim($tag['default'] ?? '') ?: null;
|
||||
$query->navigation->{$key}->ifvar = trim($tag['if'] ?? '') ?: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue