Files
Chamilo/plugin/clockworksms/lib/clockworksms_plugin.class.php
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

51 lines
1.4 KiB
PHP

<?php
/* For licensing terms, see /vendor/license.txt */
/**
* Class ClockworksmsPlugin
* This script contains SMS type constants and basic plugin functions.
*
* @package chamilo.plugin.clockworksms.lib
*
* @author Imanol Losada <imanol.losada@beeznest.com>
* @author Julio Montoya - Refactor code
*/
class ClockworksmsPlugin extends SmsPlugin
{
/**
* Constructor.
*/
public function __construct()
{
$fields = ['tool_enable' => 'boolean', 'api_key' => 'text'];
$smsTypeOptions = $this->getSmsTypeOptions();
foreach ($smsTypeOptions as $smsTypeOption) {
$fields[$smsTypeOption] = 'checkbox';
}
parent::__construct('0.1', 'Imanol Losada', $fields);
}
/**
* create (a singleton function that ensures ClockworksmsPlugin instance is
* created only once. If it is already created, it returns the instance).
*
* @return object ClockworksmsPlugin instance
*/
public static function create()
{
static $result = null;
return $result ? $result : $result = new self();
}
/**
* install (uninstalls the plugin and removes all plugin's tables and/or rows).
*/
public function uninstall()
{
$tSettings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
$sql = "DELETE FROM $tSettings WHERE subkey = 'clockworksms'";
Database::query($sql);
}
}