Slack_Settings::set_properties()
Sets up the properties of the settings page
Source
File: src/integrations/slack/settings/settings-slack.php
protected function set_properties() { // Define the ID // This should go first $this->set_id( 'slack_api' ); // Set the icon // This expects a valid <uo-icon> ID // Check the Design Guidelines to see the list of valid IDs $this->set_icon( 'slack' ); // Set the name // As this is the brand name, it probably shouldn't be translatable $this->set_name( 'Slack' ); try { $this->client = $this->helpers->get_slack_client(); $this->is_connected = true; } catch ( \Exception $e) { $this->client = array(); $this->is_connected = false; } // Set the status // This expects a valid <uo-tab> status // Check the Design Guidelines to see the list of valid statuses $this->set_status( $this->is_connected ? 'success' : '' ); // Add settings (optional) $this->register_option( 'uap_automator_slack_api_bot_name' ); $this->register_option( 'uap_automator_alck_api_bot_icon' ); // Set assets (optional) $this->set_css( '/slack/settings/assets/style.css' ); $this->set_js( '/slack/settings/assets/script.js' ); }
Expand full source code Collapse full source code View on Github