@@ -127,11 +127,6 @@ class App
127
127
/** @var View[] Modal view that need to be rendered using json output. */
128
128
private $ portals = [];
129
129
130
- /**
131
- * @var bool whether or not semantic-ui vue has been initialised
132
- */
133
- private $ is_sui_init = false ;
134
-
135
130
/**
136
131
* @var string used in method App::url to build the url
137
132
*
@@ -227,7 +222,7 @@ static function (int $severity, string $msg, string $file, int $line): bool {
227
222
}
228
223
229
224
// Set up UI persistence
230
- if (! isset ( $ this ->ui_persistence ) ) {
225
+ if ($ this ->ui_persistence === null ) {
231
226
$ this ->ui_persistence = new UiPersistence ();
232
227
}
233
228
@@ -484,7 +479,7 @@ public function initLayout($seed)
484
479
$ layout = Layout::fromSeed ($ seed );
485
480
$ layout ->setApp ($ this );
486
481
487
- if (! $ this ->html ) {
482
+ if ($ this ->html === null ) {
488
483
$ this ->html = new View (['defaultTemplate ' => 'html.html ' ]);
489
484
$ this ->html ->setApp ($ this );
490
485
$ this ->html ->invokeInit ();
@@ -535,9 +530,6 @@ public function initIncludes()
535
530
*/
536
531
public function addStyle ($ style )
537
532
{
538
- if (!$ this ->html ) {
539
- throw new Exception ('App does not know how to add style ' );
540
- }
541
533
$ this ->html ->template ->dangerouslyAppendHtml ('HEAD ' , $ this ->getTag ('style ' , $ style ));
542
534
}
543
535
@@ -568,11 +560,6 @@ public function run()
568
560
$ this ->hook (self ::HOOK_BEFORE_RENDER );
569
561
$ this ->is_rendering = true ;
570
562
571
- // if no App layout set
572
- if (!isset ($ this ->html )) {
573
- throw new Exception ('App layout should be set. ' );
574
- }
575
-
576
563
$ this ->html ->template ->set ('title ' , $ this ->title );
577
564
$ this ->html ->renderAll ();
578
565
$ this ->html ->template ->dangerouslyAppendHtml ('HEAD ' , $ this ->html ->getJs ());
0 commit comments