models/CommentModel.php
public function beforeModeration()
    {
        $descendantIds = ArrayHelper::getColumn($this->getDescendants()->asArray()->all(), 'id');

        if (!empty($descendantIds)) {
            static::updateAll(['status' => $this->status], ['id' => $descendantIds]);
        }

        return true;
    }
public function beforeModeration()
    {
        $descendantIds = ArrayHelper::getColumn($this->getDescendants()->asArray()->all(), 'id');

        if (!empty($descendantIds)) {
            static::updateAll(['status' => $this->status], ['id' => $descendantIds]);
        }

        return true;
    }
public function beforeModeration ( ) { $ descendantIds = ArrayHelper :: getColumn ( $ this -> getDescendants ( ) -> asArray ( ) -> all ( ) , 'id' ) ; if ( ! empty ( $ descendantIds ) ) { static :: updateAll ( [ 'status' => $ this -> status ] , [ 'id' => $ descendantIds ] ) ; } return true ; }
Before moderation event

@return bool
Before moderation event