/** * Before deleting the record, we make sure that it is not used as a parent page or as a * location target. */ public function delete($key) { $site_id = $this->select('siteid')->filter_by_nid($key)->rc; if ($site_id) { unset(self::$blueprint_cache[$site_id]); } return parent::delete($key); }