class NodeResourceFeedModelItem in Services 7
Same name and namespace in other branches
- 6.3 servers/rest_server/includes/node_resource.models.inc \NodeResourceFeedModelItem
- 6.2 services/node_service/node_resource.models.inc \NodeResourceFeedModelItem
Hierarchy
- class \NodeResourceFeedModelItem implements \ResourceTimeFeedModelItem
Expanded class hierarchy of NodeResourceFeedModelItem
File
- services/
node_service/ node_resource.models.inc, line 37
View source
class NodeResourceFeedModelItem implements ResourceTimeFeedModelItem {
protected $node = NULL;
public function __construct($data) {
$this->node = $data;
}
/**
* Returns the raw node title
*
* @return string
* The title of the node
*/
public function getName() {
return $this->node->title;
}
/**
* Calls node_build_content to create a teaser
*/
public function getDescription() {
if (!isset($this->node->content)) {
$this->node = node_build_content($this->node, TRUE, FALSE);
}
return $this->node->teaser;
}
/**
* Returns the absolute url to the node
*
* @return string
* The node url
*/
public function getUrl() {
return url('node/' . $this->node->nid, array(
'absolute' => TRUE,
));
}
/**
* Gets the created time for the node
*
* @return int
* The created time of the node as a timestamp
*/
public function getCreated() {
return $this->node->created;
}
/**
* Gets the created time for the node
*
* @return int
* The created time of the node as a timestamp
*/
public function getStarts() {
return $this->node->created;
}
/**
* Gets the created time for the node
*
* @return int
* The created time of the node as a timestamp
*/
public function getEnds() {
return $this->node->created;
}
/**
* Gets a associative array containing extra properties for the item.
*
* @return array
* The extra properties of the item as an array
*/
public function getProperties() {
return get_object_vars($this->node);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NodeResourceFeedModelItem:: |
protected | property | ||
NodeResourceFeedModelItem:: |
public | function | Gets the created time for the node | |
NodeResourceFeedModelItem:: |
public | function | Calls node_build_content to create a teaser | |
NodeResourceFeedModelItem:: |
public | function | Gets the created time for the node | |
NodeResourceFeedModelItem:: |
public | function | Returns the raw node title | |
NodeResourceFeedModelItem:: |
public | function | Gets a associative array containing extra properties for the item. | |
NodeResourceFeedModelItem:: |
public | function | Gets the created time for the node | |
NodeResourceFeedModelItem:: |
public | function | Returns the absolute url to the node | |
NodeResourceFeedModelItem:: |
public | function |