- 
                Notifications
    You must be signed in to change notification settings 
- Fork 19
Functions
        Dave Stewart edited this page Apr 18, 2017 
        ·
        2 revisions
      
    Sketchpad has been carefully designed to create good-looking output, so comes with a range of helper functions that you can use in your Sketchpad methods:

The demo controllers that ship with Sketchpad show all these functions interactively. Just install and navigate to test.
Echo a paragraph tag, with optional class
p('Click the button below');Bootstrap info / alert div
alert('The tests passed successfully!', $state);print_r() passed arguments
pr($data, $results);print_r() and die
pd($error);var_dump() passed arguments
vd($input);List an object's name:value properties in a nicely formatted table
ls($object);List an array of objects in a nicely formatted table
tb($results);Loads and runs a Vue file in the UI
vue('sketchpad::vue/test');Loads a Markdown file or string into the Sketchpad UI and have it transformed.
md('sketchpad::md/docs);