|  |  | @ -24,11 +24,6 @@ class ViewContent extends Component | 
			
		
	
		
		
			
				
					
					|  |  |  | 	const TOKEN_BODY_BEGIN = '<![CDATA[YII-BLOCK-BODY-BEGIN]]>'; |  |  |  | 	const TOKEN_BODY_BEGIN = '<![CDATA[YII-BLOCK-BODY-BEGIN]]>'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	const TOKEN_BODY_END = '<![CDATA[YII-BLOCK-BODY-END]]>'; |  |  |  | 	const TOKEN_BODY_END = '<![CDATA[YII-BLOCK-BODY-END]]>'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	/** |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 * @var \yii\web\AssetManager |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 */ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $assetManager; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $assetBundles; |  |  |  | 	public $assetBundles; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $title; |  |  |  | 	public $title; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $metaTags; |  |  |  | 	public $metaTags; | 
			
		
	
	
		
		
			
				
					|  |  | @ -42,14 +37,6 @@ class ViewContent extends Component | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $jsInBody; |  |  |  | 	public $jsInBody; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public $jsFilesInBody; |  |  |  | 	public $jsFilesInBody; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public function init() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		parent::init(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if ($this->assetManager === null) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			$this->assetManager = Yii::$app->getAssets(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public function reset() |  |  |  | 	public function reset() | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		$this->title = null; |  |  |  | 		$this->title = null; | 
			
		
	
	
		
		
			
				
					|  |  | @ -65,6 +52,21 @@ class ViewContent extends Component | 
			
		
	
		
		
			
				
					
					|  |  |  | 		$this->jsFilesInBody = null; |  |  |  | 		$this->jsFilesInBody = null; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	private $_assetManager; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	/** | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 * @return \yii\web\AssetManager | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 */ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	public function getAssetManager() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return $this->_assetManager ?: Yii::$app->getAssets(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	public function setAssetManager($value) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		$this->_assetManager = $value; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public function begin() |  |  |  | 	public function begin() | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		ob_start(); |  |  |  | 		ob_start(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -95,10 +97,11 @@ class ViewContent extends Component | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public function registerAssetBundle($name) |  |  |  | 	public function registerAssetBundle($name) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if (!isset($this->assetBundles[$name])) { |  |  |  | 		if (!isset($this->assetBundles[$name])) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 			$bundle = $this->assetManager->getBundle($name); |  |  |  | 			$am = $this->getAssetManager(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			$bundle = $am->getBundle($name); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			if ($bundle !== null) { |  |  |  | 			if ($bundle !== null) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 				$this->assetBundles[$name] = false; |  |  |  | 				$this->assetBundles[$name] = false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				$bundle->registerAssets($this, $this->assetManager); |  |  |  | 				$bundle->registerAssets($this, $am); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 				$this->assetBundles[$name] = true; |  |  |  | 				$this->assetBundles[$name] = true; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			} else { |  |  |  | 			} else { | 
			
		
	
		
		
			
				
					
					|  |  |  | 				throw new InvalidConfigException("Unknown asset bundle: $name"); |  |  |  | 				throw new InvalidConfigException("Unknown asset bundle: $name"); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |