src/Plugin.php
public function init()
	{
		parent::init();

		self::$plugin = $this;

		$requestService = Craft::$app->getRequest();

		$this->setComponents([
            'methods' => Service::class,
        ]);

		$this->_configureTemplateVariable();

		if ($requestService->getIsCpRequest())
		{
			$this->_configureCpResources();
			$this->_configureAssetThumbnails();
			$this->_configureAssetIndexAttributes();
		}
	}
public function init()
	{
		parent::init();

		self::$plugin = $this;

		$requestService = Craft::$app->getRequest();

		$this->setComponents([
            'methods' => Service::class,
        ]);

		$this->_configureTemplateVariable();

		if ($requestService->getIsCpRequest())
		{
			$this->_configureCpResources();
			$this->_configureAssetThumbnails();
			$this->_configureAssetIndexAttributes();
		}
	}
public function init ( ) { parent :: init ( ) ; self :: $ plugin = $ this ; $ requestService = Craft :: $ app -> getRequest ( ) ; $ this -> setComponents ( [ 'methods' => Service :: class , ] ) ; $ this -> _configureTemplateVariable ( ) ; if ( $ requestService -> getIsCpRequest ( ) ) { $ this -> _configureCpResources ( ) ; $ this -> _configureAssetThumbnails ( ) ; $ this -> _configureAssetIndexAttributes ( ) ; } }
Plugin initializer.
Plugin initializer .