protected function SchedulerApiTestCase::getPublicationStatus in Scheduler 7
Returns the publication status of a node.
Parameters
int $nid: The id of the node for which the publication status is desired.
Return value
bool TRUE if the node is published, FALSE otherwise.
2 calls to SchedulerApiTestCase::getPublicationStatus()
- SchedulerApiTestCase::assertNodeNotPublished in tests/
scheduler_api.test - Check to see if a node is not published.
- SchedulerApiTestCase::assertNodePublished in tests/
scheduler_api.test - Check to see if a node is published.
File
- tests/
scheduler_api.test, line 150 - Tests for the Scheduler API.
Class
- SchedulerApiTestCase
- Tests to cover the Scheduler API functions.
Code
protected function getPublicationStatus($nid) {
return db_select('node', 'n')
->fields('n', array(
'status',
))
->condition('n.nid', $nid)
->execute()
->fetchColumn();
}