I am not a coder but the commented lines below don't work anymore.
I managed to get it to work but once again i am not a coder so if you could look at it so the module work, thanks
FullScreenModeBlock.php
//$css_path = drupal_get_path('module', 'full_screen_mode') . '/css/full-screen-mode.css';
$css_path = base_path() . \Drupal::service('extension.list.module')->getPathname('full_screen_mode') . '/css/full-screen-mode.css';
//$css_url = file_create_url($css_path);
$css_url = \Drupal::service('file_url_generator')->generateAbsoluteString($css_path);
$build['#attached']['drupalSettings']['css_url'] = $css_url;
$build['#attached']['library'][] = 'full_screen_mode/full_screen_mode';
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot from 2024-07-04 16-38-02.png | 370.19 KB | gaurav gupta |
| #6 | Screenshot 2024-05-10 at 5.47.17 PM.png | 463.31 KB | ashutosh ahirwal |
Issue fork full_screen_mode-3446463
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rajdip_755Comment #4
rajdip_755I have removed the deprecated functions and add the corresponding services.
Please review the MR.
Thanks in advance !
Comment #6
ashutosh ahirwal commentedI have tried MR2 but it was not fixing the issue.
Proving Updated MR
Comment #7
rajdip_755Hey @ashutosh-ahirwal, thanks for the review. I have updated the MR to avoid using direct services using \Drupal.
Comment #8
gaurav gupta commentedHello
i have tested the MR and it is working in full screenmode
Images are attatched
Thanks
Comment #9
sujan shrestha commentedThe issues related to the deprecated functions have been resolved. Thank you all for your valuable feedback.