/**
* Update content objects
*
* Updates content objects, depending on the changed field definitions.
*
* A content type has a state which tells if its content objects yet have
* been adapted.
*
* Flags the content type as updated.
*
* @param mixed $contentTypeId
*
* @return void
*/
public function publish($contentTypeId)
{
$toType = $this->load($contentTypeId, Type::STATUS_DRAFT);
try {
$fromType = $this->load($contentTypeId, Type::STATUS_DEFINED);
$this->updateHandler->updateContentObjects($fromType, $toType);
$this->updateHandler->deleteOldType($fromType);
} catch (Exception\TypeNotFound $e) {
}
$this->updateHandler->publishNewType($toType, Type::STATUS_DEFINED);
}