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()
Comments
Comment #1
InternetDevels CreditAttribution: InternetDevels commentedComment #3
InternetDevels CreditAttribution: InternetDevels commentedComment #4
dawehnerWe could use $this->t() instead of t() directly here.
Comment #5
vijaycs85There are other instance in this form with t(), but just replacing the one that is related to drupal_set_title().
Comment #6
dawehnerThis is looking great now.
Comment #7
catchCommitted/pushed to 8.x, thanks!