public function doItBaby()
    {

        if (
        	EnvironmentLabel::$plugin->getSettings()->showLabel
			&& Craft::$app->getRequest()->isCpRequest
			&& Craft::$app->getUser()->getIdentity()
		) {
			$view = Craft::$app->getView();
			$view->registerCss($this->getCss());
			$view->registerCss("{$this->getTargetSelector()} { content: '{$this->getRenderedText()}'; }");
			$view->registerJs($this->getJs());
        }

    }
public function doItBaby()
    {

        if (
        	EnvironmentLabel::$plugin->getSettings()->showLabel
			&& Craft::$app->getRequest()->isCpRequest
			&& Craft::$app->getUser()->getIdentity()
		) {
			$view = Craft::$app->getView();
			$view->registerCss($this->getCss());
			$view->registerCss("{$this->getTargetSelector()} { content: '{$this->getRenderedText()}'; }");
			$view->registerJs($this->getJs());
        }

    }
public function doItBaby ( ) { if ( EnvironmentLabel :: $ plugin -> getSettings ( ) -> showLabel && Craft :: $ app -> getRequest ( ) -> isCpRequest && Craft :: $ app -> getUser ( ) -> getIdentity ( ) ) { $ view = Craft :: $ app -> getView ( ) ; $ view -> registerCss ( $ this -> getCss ( ) ) ; $ view -> registerCss ( "{$this->getTargetSelector()} { content: '{$this->getRenderedText()}'; }" ) ; $ view -> registerJs ( $ this -> getJs ( ) ) ; } }
If we're in an authenticated CP request, the label is added to the CP,
and some JS variables are injected for convenience debugging things in the console.
If we re in an authenticated CP request the label is added to the CP and some JS variables are injected for convenience debugging things in the console .