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.
Subtask of #1830588: [META] remove drupal_set_title() and drupal_get_title()
Problem/Motivation
Using procedural drupal_set_title() inside controller class is not encouraged.
Proposed resolution
Replace drupal_set_title() with #title in page return array.
Remaining tasks
Issue patch
User interface changes
Refer parent issue at #1830588: [META] remove drupal_set_title() and drupal_get_title()
API changes
Refer parent issue at #1830588: [META] remove drupal_set_title() and drupal_get_title()
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#1 | system_entity_test_remove_drupal_set_title_2102481.patch | 1.01 KB | InternetDevels |
Comments
Comment #1
InternetDevels CreditAttribution: InternetDevels commentedComment #2
dawehnerIt seems wrong to just drop the title. Can you explain why you have done this?
Comment #3
disasm CreditAttribution: disasm commentedI think it's okay to drop the title in this case. It's a test module, and no assertions are being made expecting a title, so why leave it?
Comment #4
dawehnerI would assume that people use entity_test as a potential example.
Comment #5
dawehnerI will not hold up the patch by that.
Comment #6
catchIf it's in a test module and removing it doesn't break tests, I think it makes sense to remove it. Committed/pushed to 8.x, thanks!