/**
* Get a list of the sibling documents
*
* @param array $objectTypes
* @param bool $unpublished
* @return array
*/
public function getSiblings($objectTypes = array(self::OBJECT_TYPE_OBJECT, self::OBJECT_TYPE_FOLDER), $unpublished = false)
{
if ($this->o_siblings === null || $this->lastGetSiblingObjectTypes != $objectTypes) {
$list = new Listing();
$list->setUnpublished($unpublished);
// string conversion because parentId could be 0
$list->addConditionParam("o_parentId = ?", (string) $this->getParentId());
$list->addConditionParam("o_id != ?", $this->getId());
$list->setOrderKey("o_key");
$list->setObjectTypes($objectTypes);
$list->setOrder("asc");
$this->o_siblings = $list->load();
}
return $this->o_siblings;
}