Skip to content

Commit

Permalink
setApp wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 13, 2023
1 parent b392227 commit dbae15d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions demos/layout/layouts_manual.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
$app->html = null;
$app->initLayout([Layout::class]);

$layout->setApp($app);
Text::addTo($app->layout)->addHtml($layout->render());
1 change: 1 addition & 0 deletions src/Form/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ protected function recursiveRender(): void
} else {
$hint->set($element->hint);
}
$hint->setApp($this->getApp());
$template->dangerouslySetHtml('Hint', $hint->getHtml());
} elseif ($template->hasTag('Hint')) {
$template->del('Hint');
Expand Down
1 change: 1 addition & 0 deletions src/JsCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private function _jsRenderIntoModal(View $response): JsExpressionable
$html = $response->getHtml();
} else {
$modal = new Modal(['name' => false]);
$modal->setApp($this->getApp());
$modal->add($response);
$html = $modal->getHtml();
}
Expand Down
1 change: 1 addition & 0 deletions src/Table/Column/ActionMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function addActionMenuItem($item, $action = null, string $confirmMsg = ''
$item = Factory::factory([View::class], ['name' => false, 'ui' => 'item', 'content' => $item]);
}

$item->setApp($this->getApp());
$this->items[] = $item;

$item->addClass('{$_' . $name . '_disabled} i_' . $name);
Expand Down

0 comments on commit dbae15d

Please sign in to comment.