Issue 137 - Allow formatter to set url_only and url_plain.#138
Issue 137 - Allow formatter to set url_only and url_plain.#138seth-shaw-asu merged 3 commits into2.xfrom
Conversation
seth-shaw-asu
left a comment
There was a problem hiding this comment.
As is, this throws an error:
PHP Fatal error: Could not check compatibility between
Drupal\\controlled_access_terms\\Plugin\\Field\\FieldFormatter\\AuthorityLinkFormatter::settingsForm(array $form, Drupal\\controlled_access_terms\\Plugin\\Field\\FieldFormatter\\FormStateInterface $form_state)andDrupal\\link\\Plugin\\Field\\FieldFormatter\\LinkFormatter::settingsForm(array $form, Drupal\\Core\\Form\\FormStateInterface $form_state), because classDrupal\\controlled_access_terms\\Plugin\\Field\\FieldFormatter\\FormStateInterfaceis not available in/var/www/html/drupal/web/modules/contrib/controlled_access_terms/src/Plugin/Field/FieldFormatter/AuthorityLinkFormatter.phpon line 35
Add the missing use Drupal\Core\Form\FormStateInterface; statement.
|
Looks like this is an old bug that we didn't realize because we didn't have the option to use it before now. if (!empty($settings['url_only']) && !empty($settings['url_plain'])) {
$element[$delta] = [
'#plain_text' => $link_title,
];should be (untested) if (!empty($settings['url_only']) && !empty($settings['url_plain'])) {
$element[$delta] = [
'#plain_text' =>$url;
]; |








GitHub Issue: #137
Release pull requests, etc.)
What does this Pull Request do?
Puts the "URL only" and "Show URL as plain text" checkboxes on the field formatter settings page for authority links
What's new?
(i.e. Regeneration activity, etc.)? No
How should this be tested?
A description of what steps someone could take to:
url_onlyorurl_plain. #137.Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora/committers