Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The protected \Drupal\Core\Entity\Entity::linkTemplates() method returns this:
protected function linkTemplates() {
return $this->getEntityType()->getLinkTemplates();
}
I don't see any reason for linkTemplates() to be protected when we can get it's data "manually" by using the public \Drupal\Core\Entity\Entity::getEntityType() method.
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal_2257721_2.patch | 1.72 KB | Xano |
#2 | interdiff.txt | 1.24 KB | Xano |
Comments
Comment #2
XanoI'd rather we rename the method to
getLinkTemplates()
as well. Thoughts?Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThere are getEntityType() or getEntityTypeID()... methods so yeah, this should be getter too.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedbump