/**
	 * Try to determine the possible stages for the given $object
	 * if it is versioned.
	 * 
	 * @param DataObject $object The object which will be
	 * checked.
	 * 
	 * @return array The available stages if the object is
	 * versioned.
	 */
	public static function version_stages(DataObject $object) {
		$stages = array();
		$versioned = $object->getExtensionInstance('Versioned');
		if ($versioned) {
			$stages = $versioned->getStages();
		}
		return $stages;
	}