2020-11-13 01:50:44 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace SilverStripe\CMS\GraphQL;
|
|
|
|
|
|
|
|
use SilverStripe\CMS\Model\SiteTree;
|
2024-08-18 23:37:03 +02:00
|
|
|
use SilverStripe\Dev\Deprecation;
|
2020-11-13 01:50:44 +01:00
|
|
|
|
2024-08-18 23:37:03 +02:00
|
|
|
/**
|
|
|
|
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
|
|
|
|
*/
|
2020-12-01 09:27:16 +01:00
|
|
|
class Resolver
|
2020-11-13 01:50:44 +01:00
|
|
|
{
|
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);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-11-13 01:50:44 +01:00
|
|
|
public static function resolveGetPageByLink($obj, array $args = [])
|
|
|
|
{
|
|
|
|
return SiteTree::get_by_link($args['link']);
|
|
|
|
}
|
|
|
|
}
|