eZ\Publish\Core\SignalSlot\SectionService::assignSection PHP Method

assignSection() public method

Assigns the content to the given section this method overrides the current assigned section.
public assignSection ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\Section $section )
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$section eZ\Publish\API\Repository\Values\Content\Section
    public function assignSection(ContentInfo $contentInfo, Section $section)
    {
        $returnValue = $this->service->assignSection($contentInfo, $section);
        $this->signalDispatcher->emit(new AssignSectionSignal(array('contentId' => $contentInfo->id, 'sectionId' => $section->id)));
        return $returnValue;
    }