Skip to content
Snippets Groups Projects

Update js_entity.info.yml to indicate Drupal 10 compatibility.

4 files
+ 31
22
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -141,9 +141,11 @@ class JsEntityRenderProfile extends ConfigEntityBase implements JsEntityRenderPr
* {@inheritdoc}
*/
public function id() {
if (empty($this->target_entity_type)
if (
empty($this->target_entity_type)
|| empty($this->target_entity_bundle)
|| empty($this->name)) {
|| empty($this->name)
) {
return NULL;
}
@@ -167,7 +169,11 @@ class JsEntityRenderProfile extends ConfigEntityBase implements JsEntityRenderPr
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
public function entityExist($identifier) {
return (bool) $this->getQuery()->condition('id', $identifier)->execute();
$exists = (bool) $this->getQuery()
->condition('id', $identifier)
->accessCheck(TRUE)
->execute();
return $exists;
}
/**
Loading