[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -39,6 +39,7 @@ use App\Entity\Actor;
|
||||
use App\Util\Common;
|
||||
use App\Util\Exception\RedirectException;
|
||||
use App\Util\Formatting;
|
||||
use EventResult;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
@@ -94,7 +95,7 @@ trait MetaCollectionTrait
|
||||
* It's compose of two forms: one to select collections to add
|
||||
* the current item to, and another to create a new collection.
|
||||
*/
|
||||
public function onAppendRightPanelBlock(Request $request, $vars, &$res): bool
|
||||
public function onAppendRightPanelBlock(Request $request, $vars, &$res): EventResult
|
||||
{
|
||||
$user = Common::actor();
|
||||
if (\is_null($user)) {
|
||||
@@ -186,7 +187,7 @@ trait MetaCollectionTrait
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
public function onEndShowStyles(array &$styles, string $route): bool
|
||||
public function onEndShowStyles(array &$styles, string $route): EventResult
|
||||
{
|
||||
$styles[] = 'components/Collection/assets/css/widget.css';
|
||||
$styles[] = 'components/Collection/assets/css/pages.css';
|
||||
|
||||
Reference in New Issue
Block a user