IMPR: Legacy pages

This commit is contained in:
Tony Air 2023-12-13 02:03:15 +02:00
parent db5192e2bb
commit 2bbbb541c5
1 changed files with 10 additions and 0 deletions

View File

@ -65,4 +65,14 @@ class ObjectGraphQlEx extends Extension
// TODO: GraphQL form response /element/*id*/action
return $req->requestVar('SecurityID') || $req->httpMethod() === 'POST' || preg_match('!element/([0-9]+)/([A-z]+)!', $req->getURL());
}
public function isLegacy()
{
$object = $this->owner;
return $object->config()->get('legacy') || in_array($object->ClassName, [
RedirectorPage::class,
ErrorPage::class,
]);
}
}