TemplateContentBase.php 505 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace CMText\RichContent\Templates;
  3. abstract class TemplateContentBase implements ITemplateContent
  4. {
  5. /**
  6. * Template key
  7. */
  8. const TEMPLATE_KEY = '';
  9. /**
  10. * the Content Object with the actual template properties.
  11. * @var $content object
  12. */
  13. protected $content;
  14. /**
  15. * @inheritDoc
  16. */
  17. #[\ReturnTypeWillChange]
  18. function jsonSerialize()
  19. {
  20. return (object)[
  21. static::TEMPLATE_KEY => $this->content
  22. ];
  23. }
  24. }