setContentState() public méthode

Sets the object-state of a state group to $stateId for the given content.
public setContentState ( mixed $contentId, mixed $groupId, mixed $stateId ) : boolean
$contentId mixed
$groupId mixed
$stateId mixed
Résultat boolean
 /**
  * @param Content $content
  * @param \eZ\Publish\SPI\Persistence\Content\ObjectState[] $contentStates
  */
 protected function setContentStates(Content $content, array $contentStates)
 {
     foreach ($contentStates as $contentStateGroupId => $contentState) {
         $this->objectStateHandler->setContentState($content->versionInfo->contentInfo->id, $contentStateGroupId, $contentState->id);
     }
 }