public function InstallableLibrary::createObjectRequirement in Markdown 8.2
File
- src/
Annotation/ InstallableLibrary.php, line 96
Class
Namespace
Drupal\markdown\AnnotationCode
public function createObjectRequirement(InstallablePlugin $definition = NULL) {
if ($this->object) {
$name = $this
->getLink($this->customLabel) ?: $this
->getId();
if (!$name && $definition) {
$name = $definition
->getLink($this->customLabel) ?: $definition
->getId();
}
return InstallableRequirement::create([
'value' => $this->object,
'constraints' => [
'Installed' => [
'name' => $name,
],
],
]);
}
}