inContext() public méthode

Should this menu item be used given the current context
public inContext ( string $context = '' ) : boolean
$context string A context string (default is empty string for current context stack).
Résultat boolean
 public function testInContextWithParticularContext()
 {
     $item = new \ElggMenuItem('name', 'text', 'url');
     $item->setContext(array('blog', 'bookmarks'));
     $this->assertTrue($item->inContext('blog'));
     $this->assertFalse($item->inContext('file'));
 }