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.
hook_page_build() is gone -- see this CR: https://www.drupal.org/node/2357755
hook_page_attachments() or hook_page_bottom() look like the best candidates to replace this with.
Comments
Comment #5
rahul.shindeComment #7
rahul.shindeComment #8
amarphule CreditAttribution: amarphule at DevsAdda for DevsAdda commentedReplaced the hook_page_build() with hook_page_attachments. See the CR https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
Comment #9
rahul.shindeReview of #8.
Remove this. As we have defined config for this which has the default values I believe, so no need to re-iterate.
Replace $default_behaviors with $config->get('behavior');
And remove this $default_behaviors = $config->get('behavior');
Comment #10
amarphule CreditAttribution: amarphule at DevsAdda for DevsAdda commentedUpdated .module file as suggested in comment #9. And added interdiff.
Comment #11
rahul.shinde@amarphule, please have config schema changes here as those changes are apt and should go with this ticket. Here is the comment issues-3048147#comment-13077908
Comment #12
rahul.shindeComment #13
amarphule CreditAttribution: amarphule at DevsAdda for DevsAdda commentedupdated hook_page_attachments(). updated config schema. added dependencies in libraries.yml.
Changed Unicode::* methods to mb_* functions as per https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util...
Comment #15
rahul.shindePatch merged to 8.x-1.x branch. @amarphule thanks.