silverstripe-cms/code/GraphQL/Resolver.php

26 lines
583 B
PHP
Raw Permalink Normal View History

<?php
namespace SilverStripe\CMS\GraphQL;
use SilverStripe\CMS\Model\SiteTree;
2024-08-18 23:37:03 +02:00
use SilverStripe\Dev\Deprecation;
2024-08-18 23:37:03 +02:00
/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class Resolver
{
2024-08-18 23:37:03 +02:00
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
public static function resolveGetPageByLink($obj, array $args = [])
{
return SiteTree::get_by_link($args['link']);
}
}