Method to set the publishing state for a node or list of nodes in the database table. The method respects rows checked out by other users and will attempt to checkin rows that it can after adjustments are made. The method will not allow you to set a publishing state higher than any ancestor node and will not allow you to set a publishing state on a node with a checked out child.
Signature
public function publish([mixed
$pks = null,
[integer
$state = 1,
[integer
$userId = 0]]] )
Parameters
$pks
An optional array of primary key values to update. If not
$state
The publishing state. eg. [0 = unpublished, 1 = published]