src/controllers/WebController.php
private function forceSetTitle ()
		{
			if (isset($this->_data[ 'title' ]))
				return;

			$path = Yii::$app->controller->id . '/' . Yii::$app->controller->action->id;
			if (Yii::$app->has('menu'))
			{
				foreach (Yii::$app->menu as $menu)
				{
					if ($menu->path === $path)
					{
						$this->setTitle($menu->name);

						return;
					}
				}
			}

			$this->setTitle(ucfirst(strtolower(Yii::$app->controller->id . ' ' . Yii::$app->controller->action->id)));
		}
private function forceSetTitle ()
		{
			if (isset($this->_data[ 'title' ]))
				return;

			$path = Yii::$app->controller->id . '/' . Yii::$app->controller->action->id;
			if (Yii::$app->has('menu'))
			{
				foreach (Yii::$app->menu as $menu)
				{
					if ($menu->path === $path)
					{
						$this->setTitle($menu->name);

						return;
					}
				}
			}

			$this->setTitle(ucfirst(strtolower(Yii::$app->controller->id . ' ' . Yii::$app->controller->action->id)));
		}
private function forceSetTitle ( ) { if ( isset ( $ this -> _data [ 'title' ] ) ) return ; $ path = Yii :: $ app -> controller -> id . '/' . Yii :: $ app -> controller -> action -> id ; if ( Yii :: $ app -> has ( 'menu' ) ) { foreach ( Yii :: $ app -> menu as $ menu ) { if ( $ menu -> path === $ path ) { $ this -> setTitle ( $ menu -> name ) ; return ; } } } $ this -> setTitle ( ucfirst ( strtolower ( Yii :: $ app -> controller -> id . ' ' . Yii :: $ app -> controller -> action -> id ) ) ) ; }
Force generate title if not set previously.
Force generate title if not set previously .