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';

Command icon 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

Outcast Creatures created an issue. See original summary.

rajdip_755’s picture

Assigned: Unassigned » rajdip_755

rajdip_755’s picture

Assigned: rajdip_755 » Unassigned
Status: Active » Needs review

I have removed the deprecated functions and add the corresponding services.
Please review the MR.
Thanks in advance !

Ashutosh Ahirwal made their first commit to this issue’s fork.

ashutosh ahirwal’s picture

Issue tags: +Novice, +Deprecation Removal
StatusFileSize
new463.31 KB

I have tried MR2 but it was not fixing the issue.
Proving Updated MR

rajdip_755’s picture

Hey @ashutosh-ahirwal, thanks for the review. I have updated the MR to avoid using direct services using \Drupal.

gaurav gupta’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new370.19 KB

Hello
i have tested the MR and it is working in full screenmode
Images are attatched
Thanks

sujan shrestha’s picture

Version: 1.1.0 » 1.1.4
Status: Reviewed & tested by the community » Fixed

The issues related to the deprecated functions have been resolved. Thank you all for your valuable feedback.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.