yf_test_html5fw user module

Bootstrap acceptance testing methods.

Fileplugins/test/modules/test/yf_test_html5fw.class.php
Usemodule('test_html5fw'), URL ?object=test_html5fw

Public properties

PropertyDefaultDescription
None declared in this class.

Public methods 7

container

public function container()
    public function container()
    {
        return form()->container('name');
    }

controls

public function controls()
    public function controls()
    {
        return form()
            ->text('login', 'Login', ['prepend' => '@'])
            ->select_box('color', ['r' => 'Red', 'g' => 'Green'])
            ->radio_box('size', ['s' => 'Small', 'l' => 'Large'])
            ->check_box('agree', 'I agree')
            ->textarea('note', 'Note', ['inline_help' => 'Help text'])
            ->save();
    }

error_state

public function error_state()
    public function error_state()
    {
        common()->_raise_error('Login is required', 'login');
        return form()->text('login', 'Login')->save();
    }

hidden

public function hidden()
    public function hidden()
    {
        return form()->hidden('name');
    }

text

public function text()
    public function text()
    {
        return form()->text('name');
    }

textarea

public function textarea()
    public function textarea()
    {
        return form()->textarea('name');
    }

widgets

public function widgets()
    public function widgets()
    {
        $html = _class('html');
        return $html->alert(['head' => 'Heads up', 'body' => 'Alert body', 'alert' => 'info'])
            . $html->tabs(['one' => 'First tab', 'two' => 'Second tab'])
            . $html->accordion(['one' => 'First panel', 'two' => 'Second panel'])
            . $html->breadcrumbs([['name' => 'Home', 'link' => './'], ['name' => 'Here']])
            . $html->pagination(['1' => './?page=1', '2' => './?page=2', 'prev' => './?page=1', 'next' => './?page=2'])
            . $html->div_box('menu', ['a' => 'Alpha', 'b' => 'Beta'], 'a')
            . $html->modal(['header' => 'Inline modal', 'body' => 'Modal body', 'inline' => 1, 'show_close' => 1]);
    }