function Notifications_Content_Node_View::text_content in Notifications 7
Content text.
@todo Better way to render view
Overrides Notifications_Content_Node_List::text_content
File
- notifications_content/
notifications_content.inc, line 436 - Drupal Notifications Framework - Default class file
Class
- Notifications_Content_Node_View
- Template for a list of nodes, built with a View
Code
function text_content($options) {
if (!isset($this->view_content)) {
$view = $this
->get_view();
// Weird: if we pass same objects, the view alters some of them, causing it to reference to PDO Object
// Which causes an exception if trying to serialize. So we need to unlink the view from the node after render()
$node_list = $this
->node_list();
$view->result = $node_list;
$view->executed = TRUE;
$this->view_content = $view
->render();
foreach ($node_list as $node) {
unset($node->view);
}
}
return $this->view_content;
}