public function ExternalLinkPopup::jsonSerialize in External Link Pop-up 8
File
- src/
Entity/ ExternalLinkPopup.php, line 239
Class
- ExternalLinkPopup
- Represents an External Link Pop-up entity.
Namespace
Drupal\external_link_popup\EntityCode
public function jsonSerialize() {
$body = isset($this->body['value']) ? check_markup($this->body['value'], isset($this->body['format']) ? $this->body['format'] : NULL) : '';
return [
'id' => $this
->id(),
'name' => $this
->label(),
'status' => $this
->status(),
'weight' => $this->weight,
'close' => $this->close,
'title' => $this->title,
'body' => $body,
'labelyes' => $this->labelyes,
'labelno' => $this->labelno,
'domains' => $this->domains,
'target' => $this->new_tab ? '_blank' : '_self',
];
}