public function setPageObject($object, $admin_name, $property_value) { $this->page_objects[$admin_name] = $object; $admin = $this->loader->getAdminByName($admin_name); $property_id = $admin->getPropertyIdName(); $value = (string) $admin->getReflectionProperty($property_id)->getValue($object); if ($value === $property_value) { return; } $property_slug = $admin->getPropertySlugName(); if (!empty($property_slug)) { $value = (string) $admin->getReflectionProperty($property_slug)->getValue($object); if ($value === $property_value) { return; } } throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException(); }