Skip to content

Commit

Permalink
Remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
reganlawton committed Jun 29, 2020
1 parent 229eb19 commit e0b0ffe
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions src/gql/OembedFieldTypeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,48 +60,6 @@ public static function generateTypes($context = null): array
return [$property];
}

/**
* @inheritdoc
*/
public static function generateType($context = null)
{
/** @var OembedField $context */
$typeName = self::getName($context);

$properties = [
'title' => Type::string(),
'description' => Type::string(),
'url' => Type::string(),
'type' => Type::string(),
'image' => Type::string(),
'imageWidth' => Type::string(),
'imageHeight' => Type::string(),
'code' => Type::string(),
'width' => Type::string(),
'height' => Type::string(),
'aspectRatio' => Type::string(),
'authorName' => Type::string(),
'authorUrl' => Type::string(),
'providerName' => Type::string(),
'providerUrl' => Type::string(),
];

$property = GqlEntityRegistry::getEntity($typeName)
?: GqlEntityRegistry::createEntity($typeName, new OembedFieldResolver([
'name' => $typeName,
'description' => 'This entity has all the Oembed Field properties',
'fields' => function () use ($properties) {
return $properties;
},
]));

TypeLoader::registerType($typeName, function () use ($property) {
return $property;
});

return $property;
}

/**
* @inheritdoc
*/
Expand Down

0 comments on commit e0b0ffe

Please sign in to comment.