Upgrade to 3.5.2

This commit is contained in:
Bastian Allgeier
2021-02-09 16:55:18 +01:00
parent 99c36fa137
commit b507926ad1
53 changed files with 350 additions and 355 deletions

View File

@@ -75,6 +75,31 @@ class Layout extends Item
return $this->columns;
}
/**
* Checks if the layout is empty
*
* @return bool
*/
public function isEmpty(): bool
{
return $this
->columns()
->filter(function ($column) {
return $column->isNotEmpty();
})
->count() === 0;
}
/**
* Checks if the layout is not empty
*
* @return bool
*/
public function isNotEmpty(): bool
{
return $this->isEmpty() === false;
}
/**
* The result is being sent to the editor
* via the API in the panel