public function assignSectionToSubtree(Location $location, Section $section): void
    {
        $this->service->assignSectionToSubtree($location, $section);

        $this->signalDispatcher->emit(
            new AssignSectionToSubtreeSignal(
                [
                    'locationId' => $location->id,
                    'sectionId' => $section->id,
                ]
            )
        );
    }
public function assignSectionToSubtree(Location $location, Section $section): void
    {
        $this->service->assignSectionToSubtree($location, $section);

        $this->signalDispatcher->emit(
            new AssignSectionToSubtreeSignal(
                [
                    'locationId' => $location->id,
                    'sectionId' => $section->id,
                ]
            )
        );
    }
public function assignSectionToSubtree ( Location $ location , Section $ section ) : void { $ this -> service -> assignSectionToSubtree ( $ location , $ section ) ; $ this -> signalDispatcher -> emit ( new AssignSectionToSubtreeSignal ( [ 'locationId' => $ location -> id , 'sectionId' => $ section -> id , ] ) ) ; }
Assigns the subtree to the given section.

This method overrides the current assigned section.

@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException

@param \eZ\Publish\API\Repository\Values\Content\Location $location
@param \eZ\Publish\API\Repository\Values\Content\Section $section
Assigns the subtree to the given section .