public function disable($pos = null)
{
if ($pos === null || !in_array($pos, array_keys($this->segments))) {
throw new OutOfRangeException('Refering to non existent Segment position!');
} else {
$selectedSegment = $this->segments[$pos];
$selectedSegment->disable();
}
return $this;
}
/** * @Test */ public function testIsDisableSegment() { $this->bread->append('testelement', 'left', false, false); $this->bread->disable(0); $seg = $this->bread->segment(0); $this->assertEquals(true, $seg->get('disabled')); }