68 lines
1.2 KiB
PHP
Executable File
68 lines
1.2 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Gravity Flow Step Feed Slack
|
|
*
|
|
* @package GravityFlow
|
|
* @subpackage Classes/Gravity_Flow_Step_Feed_Slack
|
|
* @copyright Copyright (c) 2016-2018, Steven Henty S.L.
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
|
* @since 1.3.2-dev
|
|
*/
|
|
|
|
if ( ! class_exists( 'GFForms' ) ) {
|
|
die();
|
|
}
|
|
|
|
/**
|
|
* Class Gravity_Flow_Step_Feed_Slack
|
|
*/
|
|
class Gravity_Flow_Step_Feed_Slack extends Gravity_Flow_Step_Feed_Add_On {
|
|
|
|
/**
|
|
* The step type.
|
|
*
|
|
* @var string
|
|
*/
|
|
public $_step_type = 'slack';
|
|
|
|
/**
|
|
* The name of the class used by the add-on.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $_class_name = 'GFSlack';
|
|
|
|
/**
|
|
* Returns the step label.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function get_label() {
|
|
return 'Slack';
|
|
}
|
|
|
|
/**
|
|
* Returns the feed name.
|
|
*
|
|
* @param array $feed The Slack feed properties.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function get_feed_label( $feed ) {
|
|
$label = $feed['meta']['feed_name'];
|
|
|
|
return $label;
|
|
}
|
|
|
|
/**
|
|
* Returns the URL for the step icon.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function get_icon_url() {
|
|
return $this->get_base_url() . '/images/slack-icon.png';
|
|
}
|
|
}
|
|
|
|
Gravity_Flow_Steps::register( new Gravity_Flow_Step_Feed_Slack() );
|