Smart layout behavior for YII2