You are here

public function boxes_simple::render in Boxes 7

Same name and namespace in other branches
  1. 6 plugins/boxes_simple.inc \boxes_simple::render()

Implements boxes_box::render().

Overrides boxes_box::render

File

plugins/boxes_simple.inc, line 43

Class

boxes_simple
Simple custom text box.

Code

public function render() {
  $content = '';
  if (!empty($this->options['body']['value']) && isset($this->options['body']['format'])) {
    $content = check_markup($this->options['body']['value'], $this->options['body']['format'], $langcode = '', FALSE);
  }
  $title = isset($this->title) ? $this->title : NULL;
  return array(
    'delta' => $this->delta,
    // Crucial.
    'title' => $title,
    'subject' => check_plain($title),
    'content' => $content,
  );
}