public useActiveBranch ( boolean $boolean = null ) : mixte | ||
$boolean | boolean | Set the branch is active or only one page |
Résultat | mixte |
public function useActiveBranch($boolean = null)
{
if ($boolean === null) {
return $this->useActiveBranch;
}
$this->useActiveBranch = (bool) $boolean;
return $this;
}
/** * Test * * @return void */ public function testRenderWithChildrenActivePageOnTheForthDocument() { Registry::get('Application')->getRequest()->getUri()->setPath('/url-key/children-key/second-child-key'); $this->object = new Navigation(); $this->object->useActiveBranch(true); $array = $this->object->render(); $this->assertTrue(count($array) > 0); }