* @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;