/** * Checks if associations scopes are matching * * @param Entity $object * @throws \Exception rethrows caught exception */ private function checkScope(Entity &$object) { if (!empty($this->localization) && !empty($this->block)) { try { // do not-strict match (allows page data with template block) $this->localization->matchDiscriminator($this->block); } catch (\Exception $e) { $object = null; throw $e; } } }