Neos\Flow\Mvc\Routing\UriBuilder::setSection PHP Méthode

setSection() public méthode

..)
public setSection ( string $section ) : UriBuilder
$section string
Résultat UriBuilder the current UriBuilder to allow method chaining
    public function setSection($section)
    {
        $this->section = $section;
        return $this;
    }

Usage Example

 /**
  * @test
  */
 public function buildAppendsSectionIfSectionIsSpecified()
 {
     $this->mockRouter->expects($this->once())->method('resolve')->will($this->returnValue('resolvedUri'));
     $this->uriBuilder->setSection('SomeSection');
     $expectedResult = 'resolvedUri#SomeSection';
     $actualResult = $this->uriBuilder->build();
     $this->assertEquals($expectedResult, $actualResult);
 }