Skip to content

Instantly share code, notes, and snippets.

View SKuipers's full-sized avatar

Sandra Kuipers SKuipers

View GitHub Profile
@SKuipers
SKuipers / BreadcrumbOOification.md
Last active March 24, 2021 20:48
Breadcumb OOification for Gibbon v17.0.00

The breadcrumbs->add() method:

/**
     * Add a named route to the trail.
     *
     * @param string $title   Name to display on this route's link
     * @param string $route   URL relative to the trail's BaseURL
     * @param array  $params  Additional URL params to append to the route
@SKuipers
SKuipers / TableOOification.md
Last active March 24, 2021 20:48
Table OOification Cheat Sheet

Our goal with the table ooification is to refactor the current tables, which are written as a mix of procedural php + html + javascript + inline css. These are being replaced with a set of DataTable classes and functionality, which aim to provide an easily readable set of methods for developers to compose a DataTable object.

(Eventually, once routing and controllers are introduced, these DataTable objects will be passed to a View rather than echoed out in the script itself. More on that later!)

For example:

An original Roll Groups table and the refactored version of the same table.

@SKuipers
SKuipers / FormOOification.md
Last active March 24, 2021 20:48
Form OOification Template

Forms

Use this namespace for all forms:

use Gibbon\Forms\Form;

Form - Basic example.

$form = Form::create('action', $_SESSION[$guid]['absoluteURL'].'/modules/'.$_SESSION[$guid]['module'].'/thing.php');