public function afterDelete()
    {
        if ($this->cachedDeletedId) {
            foreach (NavItemPageBlockItem::find()->where(['block_id' => $this->cachedDeletedId])->all() as $item) {
                $item->delete();
            }
        }
        parent::afterDelete();
    }
public function afterDelete()
    {
        if ($this->cachedDeletedId) {
            foreach (NavItemPageBlockItem::find()->where(['block_id' => $this->cachedDeletedId])->all() as $item) {
                $item->delete();
            }
        }
        parent::afterDelete();
    }
public function afterDelete ( ) { if ( $ this -> cachedDeletedId ) { foreach ( NavItemPageBlockItem :: find ( ) -> where ( [ 'block_id' => $ this -> cachedDeletedId ] ) -> all ( ) as $ item ) { $ item -> delete ( ) ; } } parent :: afterDelete ( ) ; }
Search for entries with cached block id in cms_nav_item_page_block_item and delete them
Search for entries with cached block id in cms_nav_item_page_block_item and delete them