LLMS_REST_Table_Webhooks::get_data( string $key, LLMS_REST_API_Key $webhook )
Retrieve data for the columns
Parameters Parameters
- $key
-
(string) (Required) the column id / key.
- $webhook
-
(LLMS_REST_API_Key) (Required) API key object.
Return Return
(mixed)
Source Source
File: libraries/lifterlms-rest/includes/admin/tables/class-llms-rest-table-webhooks.php
public function get_data( $key, $webhook ) { switch ( $key ) { case 'name': $value = $this->get_name_cell( $webhook ); break; case 'status': $statuses = LLMS_REST_API()->webhooks()->get_statuses(); $value = $webhook->get( $key ); $value = isset( $statuses[ $value ] ) ? $statuses[ $value ] : $value; break; case 'delivery_url': $value = llms_trim_string( $webhook->get( $key ), 40 ); break; default: $value = $webhook->get( $key ); } return $this->filter_get_data( $value, $key, $webhook ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.3 | Output translated status instead of the database value; trim the delivery URL to 40 characters. |
1.0.0-beta.1 | Introduced. |