Tool::getListModels PHP 메소드

getListModels() 공개 메소드

データソースを指定してモデルリストを取得する
public getListModels ( $type = 'core' ) : array
리턴 array
    public function getListModels($type = 'core')
    {
        $db = ConnectionManager::getDataSource('default');
        $listSources = $db->listSources();
        if (!$listSources) {
            return array();
        }
        $tableList = getTableList();
        $sources = array();
        foreach ($listSources as $source) {
            if (in_array($source, $tableList[$type])) {
                $sources[] = $source;
            }
        }
        return $sources;
    }