本文整理汇总了PHP中Style::getStyles方法的典型用法代码示例。如果您正苦于以下问题:PHP Style::getStyles方法的具体用法?PHP Style::getStyles怎么用?PHP Style::getStyles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::getStyles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// get default values
if (!count($_POST)) {
$sql = "SELECT\t*\n\t\t\t\tFROM\twcf" . WCF_N . "_style_to_package";
$result = WCF::getDB()->sendQuery($sql);
while ($row = WCF::getDB()->fetchArray($result)) {
if ($row['isDefault']) {
$this->defaultStyleIDArray[$row['packageID']] = $row['styleID'];
}
if ($row['disabled']) {
if (!isset($this->disabledStyleIDArray[$row['packageID']])) {
$this->disabledStyleIDArray[$row['packageID']] = array();
}
$this->disabledStyleIDArray[$row['packageID']][] = $row['styleID'];
}
}
}
// get standalone packages
$sql = "SELECT\tpackage.*,\n\t\t\t\tCASE WHEN package.instanceName <> '' THEN package.instanceName ELSE package.packageName END AS packageName\n\t\t\tFROM\twcf" . WCF_N . "_package package\n\t\t\tWHERE\tpackage.packageID IN (\n\t\t\t\t\tSELECT\tpackageID\n\t\t\t\t\tFROM\twcf" . WCF_N . "_package_dependency\n\t\t\t\t\tWHERE\tdependency IN (\n\t\t\t\t\t\t\tSELECT\tpackageID\n\t\t\t\t\t\t\tFROM\twcf" . WCF_N . "_package\n\t\t\t\t\t\t\tWHERE\tpackage = 'com.woltlab.wcf.system.style'\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tAND standalone = 1";
$result = WCF::getDB()->sendQuery($sql);
while ($row = WCF::getDB()->fetchArray($result)) {
$this->packages[] = $row;
}
// get available styles
$this->styles = Style::getStyles();
}
示例2: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// get available styles
$this->styles = Style::getStyles();
}