public function beforeModeration(): bool
    {
        if (method_exists($this->owner, 'beforeModeration')) {
            if (!$this->owner->beforeModeration()) {
                return false;
            }
        }

        $event = new ModelEvent();
        $this->owner->trigger(self::EVENT_BEFORE_MODERATION, $event);

        return $event->isValid;
    }
public function beforeModeration(): bool
    {
        if (method_exists($this->owner, 'beforeModeration')) {
            if (!$this->owner->beforeModeration()) {
                return false;
            }
        }

        $event = new ModelEvent();
        $this->owner->trigger(self::EVENT_BEFORE_MODERATION, $event);

        return $event->isValid;
    }
public function beforeModeration ( ) : bool { if ( method_exists ( $ this -> owner , 'beforeModeration' ) ) { if ( ! $ this -> owner -> beforeModeration ( ) ) { return false ; } } $ event = new ModelEvent ( ) ; $ this -> owner -> trigger ( self :: EVENT_BEFORE_MODERATION , $ event ) ; return $ event -> isValid ; }
This method is invoked before moderating a record.

@return bool
This method is invoked before moderating a record .