mirror of
https://git.beihong.wang/wangbeihong/blog-source.git
synced 2026-04-23 16:33:04 +08:00
22 lines
347 B
PHP
Executable File
22 lines
347 B
PHP
Executable File
<?php
|
|
|
|
namespace Widget\Metas\Category;
|
|
|
|
use Typecho\Db\Exception;
|
|
|
|
/**
|
|
* Trait InitTreeRowsTrait
|
|
*/
|
|
trait InitTreeRowsTrait
|
|
{
|
|
/**
|
|
* @return array
|
|
* @throws Exception
|
|
*/
|
|
protected function initTreeRows(): array
|
|
{
|
|
return $this->db->fetchAll($this->select()
|
|
->where('type = ?', 'category'));
|
|
}
|
|
}
|