-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typed Relation #3
Conversation
Person's auto_entitylabel config isn't working without the token module.
includes field, widget, and formatter
I'll give it a spin tomorrow! |
Oh, yeah. I should have checked the coding standards first... I'll clean those up now. |
I ran through the testing steps and can verify that this worked as expected. I did have trouble upgrading the module in-situ and having the new field appear. I ended up starting with a new vagrant from scratch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes worked as expected. I did have difficulty upgrading from the master branch, but the solution for that, an update hook, is not appropriate since there is no release of this module yet!
@patdunlavey yeah, I haven't figured out how to get modules that define content types using configs to uninstall cleanly. Glad there weren't any other problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One variable to be removed and one question. Otherwise it reads good.
*/ | ||
public function viewElements(FieldItemListInterface $items, $langcode) { | ||
$elements = parent::viewElements($items, $langcode); | ||
$values = $items->getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable never used, can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Yes, that was hold over from a previous strategy.
'type' => 'text', | ||
'size' => 'tiny', | ||
'not null' => TRUE, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what is going on here. Is this adding in the schema? Could/should this be a yaml file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Drupal 8 "Create a custom field type" documentation: "FieldItemInterface::schema() should be overridden, in order to tell the system how to store the value(s) for the field." Every example of custom fields I've seen does it.
* merge upstream (#3) * drupal 9 support * coding styles
Adds a TypedRelation Field, Formatter, and Widget. Also adds a Linked Agent field to the Person content type.
Related to issue: Islandora/documentation/issues/889 and Islandora/documentation/issues/893
Testing:
Interested parties: @patdunlavey @rosiel @rtilla1