Skip to content

Commit

Permalink
Update RelationIsDescriptorAddon.php
Browse files Browse the repository at this point in the history
ready for webtrees 2.1
  • Loading branch information
hartenthaler committed May 3, 2022
1 parent 48531a1 commit 54212dc
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions RelationIsDescriptorAddon.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,28 +181,13 @@ public function resourcesFolder(): string
return '';
}

/**
* original function "register", which is not any longer available
*
* Register more elements.
*
* @param array<string,ElementInterface> $elements
private function register(array $elements): void
{
$this->elements = array_merge($this->elements(), $elements);
}
*/

public function boot(): void
{
$ef = Registry::elementFactory();
// this was: $ef->register(['INDI:ASSO:RELA' => new ExtendedRelationIsDescriptor(I18N::translate('Relationship'))]);
$ef->make('INDI:ASSO:RELA');
$ef->make('INDI:*:ASSO:RELA');
$ef->make('INDI:*:_ASSO:RELA');
$ef->make('FAM:*:_ASSO:RELA');
x = new ExtendedRelationIsDescriptor();
$ef->registerTags(['INDI:ASSO:RELA' => new ExtendedRelationIsDescriptor(I18N::translate('Relationship'))]);
$ef->registerTags(['INDI:*:ASSO:RELA' => new ExtendedRelationIsDescriptor(I18N::translate('Relationship'))]);
$ef->registerTags(['INDI:*:_ASSO:RELA' => new ExtendedRelationIsDescriptor(I18N::translate('Relationship'))]);
$ef->registerTags(['FAM:*:_ASSO:RELA' => new ExtendedRelationIsDescriptor(I18N::translate('Relationship'))]);
}

/**
Expand Down

0 comments on commit 54212dc

Please sign in to comment.