core/web/Element.php
public function addElement($name, $closure, $mockedArgs = [])
    {
        $this->_elements[$name] = $closure;
        
        $this->mockArgs($name, $mockedArgs);
    }
public function addElement($name, $closure, $mockedArgs = [])
    {
        $this->_elements[$name] = $closure;
        
        $this->mockArgs($name, $mockedArgs);
    }
public function addElement ( $ name , $ closure , $ mockedArgs = [ ] ) { $ this -> _elements [ $ name ] = $ closure ; $ this -> mockArgs ( $ name , $ mockedArgs ) ; }
Add an element with a closure to the elements array.

@param string $name The identifier of the element where the close is binde to.
@param callable $closure The closure function to registered, for example:

```php
function() {
return 'foobar';
}
```

@param array $mockedArgs An array with key value pairing for the argument in order to render them for the styleguide.
Add an element with a closure to the elements array .