Initial Commit

This commit is contained in:
Kilian Hofmann
2021-06-01 19:54:59 +02:00
commit 052cbe3038
17 changed files with 1004 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace GermanAirlinesVa\Graphql\Classes;
use Cms\Classes\Theme;
class Schema extends Theme
{
/**
* Returns the absolute theme path.
* @param string $dirName Optional theme directory. Defaults to $this->getDirName()
* @return string
*/
public function getPath(?string $dirName = null): string
{
if (!$dirName) {
$dirName = $this->getDirName();
}
return base_path() . '/' . $dirName;
}
/**
* Returns a list of graphs in the template.
* @param boolean $skipCache Indicates if the pages should be reloaded from the disk bypassing the cache.
* @return array Returns an array of Nocio\Headstart\Classes\Graph objects.
*/
public function listGraphs($skipCache = false)
{
return Graph::listInTheme($this, $skipCache);
}
/**
* Returns the active theme code.
*
* @return string
* If the theme doesn't exist, returns null.
*/
public static function getActiveThemeCode(): ?string
{
return 'graphql';
}
}