mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +00:00
Adjust return value
This commit is contained in:
parent
9f7627f09e
commit
c428cfe7ca
|
|
@ -186,7 +186,7 @@ abstract class ViewAbstract implements \Serializable
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) /* : void */
|
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) : bool
|
||||||
{
|
{
|
||||||
if ($overwrite || !isset($this->views[$id])) {
|
if ($overwrite || !isset($this->views[$id])) {
|
||||||
$this->views[$id] = $view;
|
$this->views[$id] = $view;
|
||||||
|
|
@ -194,7 +194,11 @@ abstract class ViewAbstract implements \Serializable
|
||||||
if ($order !== 0) {
|
if ($order !== 0) {
|
||||||
uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user