mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
20 lines
405 B
PHP
20 lines
405 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
namespace SilverStripe\CMS\GraphQL;
|
||
|
|
||
|
use SilverStripe\CMS\Model\SiteTree;
|
||
|
use SilverStripe\GraphQL\Schema\Resolver\DefaultResolverProvider;
|
||
|
|
||
|
if (!class_exists(DefaultResolverProvider::class)) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
class Resolver extends DefaultResolverProvider
|
||
|
{
|
||
|
public static function resolveGetPageByLink($obj, array $args = [])
|
||
|
{
|
||
|
return SiteTree::get_by_link($args['link']);
|
||
|
}
|
||
|
}
|