You are here

public function HostingNode::fixNodeFieldDisplay in Aegir Objects 7.3

Display a field as an Aegir-themed 'info' item.

1 call to HostingNode::fixNodeFieldDisplay()
HostingNode::nodeView in classes/HostingNode.inc
Alter the display of a node.

File

classes/HostingNode.inc, line 52
The HostingNode class.

Class

HostingNode
@file The HostingNode class.

Code

public function fixNodeFieldDisplay($field) {
  if (isset($this->node->content[$field])) {
    $this->node->content['info'][$field] = array(
      '#type' => 'item',
      '#title' => $this->node->content[$field]['#title'],
      '#markup' => $this->node->content[$field][0]['#markup'],
    );
    unset($this->node->content[$field]);
  }
}