本文整理汇总了PHP中GFNotification::get_notification_services方法的典型用法代码示例。如果您正苦于以下问题:PHP GFNotification::get_notification_services方法的具体用法?PHP GFNotification::get_notification_services怎么用?PHP GFNotification::get_notification_services使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFNotification
的用法示例。
在下文中一共展示了GFNotification::get_notification_services方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* GFNotificationTable constructor.
*
* Sets required class properties and defines the list table columns
*
* @see GFNotification::get_notification_events
* @see GFNotification::get_notification_services
*
* @param array $form The Form Object to use
*/
function __construct($form)
{
$this->form = $form;
$this->notification_events = GFNotification::get_notification_events($form);
$this->notification_services = GFNotification::get_notification_services();
$columns = array('cb' => '', 'name' => esc_html__('Name', 'gravityforms'), 'subject' => esc_html__('Subject', 'gravityforms'));
if (count($this->notification_events) > 1) {
$columns['event'] = esc_html__('Event', 'gravityforms');
}
if (count($this->notification_services) > 1) {
$columns['service'] = esc_html__('Service', 'gravityforms');
}
$this->_column_headers = array($columns, array(), array(), 'name');
parent::__construct();
}
示例2: column_service
function column_service($notification)
{
$services = GFNotification::get_notification_services();
if (!rgar($notification, 'service')) {
esc_html_e('WordPress', 'gravityforms');
} else {
if (rgar($services, $notification['service'])) {
$service = rgar($services, $notification['service']);
echo rgar($service, 'label');
} else {
esc_html_e('Undefined Service', 'gravityforms');
}
}
}