void add_link_col(
string
$name, string
$target_page, string
$capture
)
|
|
Adds new column
Adds new linl column to the grid with name $name, href link pointing to $target and capture $capture. Generated link will look like: <a href="$target?$capture=$link_column_capture">Something</a>
Parameters:
|
string |
$name: |
Column name |
|
string |
$target_page: |
Target page |
|
string |
$capture: |
Label for the capture |
API Tags:
void add_link_cols_capture_values_row(
arary
$row
)
|
|
Adds link columns capture values
Link columns capture values are values that will be added at the end of the link. Example: <a href="somepage.php?obj=5"> somepage.php is $target @see SP_Grid_WLC::add_link_col() obj is the capture label 5 is the link column capture value - normally this is the id of the record but you may use different column @see SP_Grid_WLC::set_rows_and_link_cols_rows_from_raw_rows
Parameters:
API Tags:
string get_static_html(
string
$path, string
$language
)
|
|
Returns HTML for the grid
Parameters:
|
string |
$path: |
Path to template file |
|
string |
$language: |
Navive language code |
API Tags:
Redefinition of:
- Static_Paginated_Grid::get_static_html()
- Returns generated HTML
Prepares row to be used in a convinient way by this class
API Tags:
| Internal: | |
| Access: | protected |
Information Tags:
| Throws: | TE_Key_Not_Exists |
Redefinition of:
- Static_Paginated_Grid::prepare_rows()
- Convert row to usable by the class format
void set_link_cols_capture_values_rows(
array
$rows
)
|
|
Sets all link columns capture values at once
Parameters:
API Tags:
void set_rows(
&$rows, array
$rows
)
|
|
Sets all rows at once
Shorhand for setting all rows with using column 0 and skipping used column This function is convinient when you select from database like: "Select obj.id, obj.name, obj.description where...".
Parameters:
API Tags:
| See: | SP_Grid_WLC::set_rows_and_link_cols_rows_from_raw_rows |
| Access: | public |
Redefinition of:
- Grid::set_rows()
- Sets all rows at once
void set_rows_and_link_cols_rows_from_raw_rows(
array
$raw_rows, [integer
$use_col_num = 0], [boolena
$skip_used_col = false]
)
|
|
Sets all data rows and link column capture rows using "raw rows"
Parameters:
|
array |
$raw_rows: |
Array of rows as returned by the SELECT form DB |
|
integer |
$use_col_num: |
Which column to be used for value of link columns capture value |
|
boolena |
$skip_used_col: |
If true used column will be skipped and will not exists in final array |
API Tags:
array shift_down(
array
$row
)
|
|
Shifts down the array in order to have continiuos array index starting with 0
Parameters:
API Tags:
| Internal: | |
| Access: | private |