Class bootstrap
A utility class for performing operations on Bootstrap markup.
Namespace: ski
Located at packages/ski.web/services/ski.service.bootstrap.php
Methods summary
public static
string
|
#
convert_to_equal_grid_columns( integer/string $num_sections = 1, string $size_abbr = '' )
Bootstrap works on a 12-column grid. This function takes a number of sections
and turns it into a number of columns so that calling code can properly set the
grid classes (e.g. col-md-3).
Bootstrap works on a 12-column grid. This function takes a number of sections
and turns it into a number of columns so that calling code can properly set the
grid classes (e.g. col-md-3).
Parameters
- $num_sections
integer/string $num_sections How many sections are desired - must be divisible by 12
- $size_abbr
string $size_abbr Pass in a value like 'xs', 'sm', 'md', 'lg', to get the full
Bootstrap grid class or leave blank to retrieve the number of columns
Returns
string The Bootstrap class like 'col-md-6', 'col-xs-3', etc OR the size of each column
like '6' or '3'
Link
|
public static
string
|
#
generate_list( string|array $items )
Generates a Bootstrap 'list-group' element with the given items.
Generates a Bootstrap 'list-group' element with the given items.
Parameters
- $items
string|array $items The plain-text items to include in the markup.
Returns
string The desired markup
|
Magic methods summary