Files
thetempusproject/app/plugins/updates/forms.php
2024-08-04 21:15:59 -04:00

37 lines
943 B
PHP

<?php
/**
* app/plugins/updates/forms.php
*
* This houses all of the form checking functions for this plugin.
*
* @package TP Status-Updates
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Plugins\Updates;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Classes\Forms;
class UpdateForms extends Forms {
/**
* Adds these functions to the form list.
*/
public function __construct() {
self::addHandler( 'createUpdate', __CLASS__, 'createUpdate' );
}
public static function createUpdate() {
if ( ! Input::exists( 'status' ) ) {
Check::addUserError( 'You must provide an status.' );
return false;
}
return true;
}
}
new UpdateForms;